GenericMappingTools / pygmt

A Python interface for the Generic Mapping Tools.
https://www.pygmt.org
BSD 3-Clause "New" or "Revised" License
747 stars 216 forks source link

how to draw a rose in cartesian projection #714

Closed mattijn closed 3 years ago

mattijn commented 3 years ago

I found out I'm able to add a map scale and a rose for a geographic projection:

fig = pygmt.Figure()
fig.basemap(region=[0, 5, 55, 56], projection="S2.5/90/2i", frame=["a+ue", "wsEN"], rose='jMC+w0.5i')
fig.show()

image

fig = pygmt.Figure()
fig.basemap(region=[0, 5, 55, 56], projection="S2.5/90/2i", frame=["a+ue", "wsEN"], map_scale='jMC+c1+w100k+f+l')
fig.show()

image

And I could add a map scale in a cartesian projection

fig = pygmt.Figure()
fig.basemap(region='0/1000/1000/2000+ue', projection='x1:10000', frame=["ag", "wsEN"], map_scale='jMC+w500e+l')
fig.show()

image

But how do I add a rose in a cartesian projection? Since the following is giving me a blank plot:

fig = pygmt.Figure()
fig.basemap(region='0/1000/1000/2000+ue', projection='x1:10000', frame=["ag", "wsEN"], rose='jMC+w0.2i+l')
fig.show()

image

welcome[bot] commented 3 years ago

👋 Thanks for opening your first issue here! Please make sure you filled out the template with as much detail as possible. You might also want to take a look at our contributing guidelines and code of conduct.

seisman commented 3 years ago

@PaulWessel Any thoughts?

PaulWessel commented 3 years ago

Well, not sure what "north" means if x is time and y is in kilos. If the user has UTM meters then one can lay down basemaps in geographic coordinates and plot the meters as Cartesian but that is a special case.

mattijn commented 3 years ago

My real plot is in EPSG:28992 projection, which are meters. It looks as follow:

image

Which was prepared with this notebook

https://github.com/mattijn/KNMI-radar-PyGMT/blob/main/pygmt%20rioxarray%20KNMI%20radar.ipynb

seisman commented 3 years ago

@mattijn The issue has been addressed in upstream PR https://github.com/GenericMappingTools/gmt/pull/4535.

mattijn commented 3 years ago

Fast! +1

seisman commented 3 years ago

As mentioned above, the issue has been fixed in upstream GMT codes. I don't think we need to add a PyGMT test for this. Closing the issue.