You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Failed to specify the suffix for latitudes (i.e. N/S) in the polar coordinate system (-Jp, -JP) #5120
Description of the problem
I wanted to plot data that are given in polar coordinates (latitude, radius), so I chose the linear projection -JP. But I encountered the following problems:
The angle was treated as longitude by default rather than latitude, so the suffix was W or E.
The options +llabel and +uunit didn't work under the projection with polar coordinates -JP.
Full script that generated the error
Here is a minimum working example:
gmt begin Jp jpg E300
gmt set FORMAT_GEO_MAP ddd:mm:ssF
gmt basemap -JP5c+z+t0 -R-30/30/4371/6371 -Bxa15f+u" N" -Bya+l"Depth (km)" -BWNse
gmt end show
Thanks for the post. I guess GMT cannot know what the angular measures are, so it will need to be told. It looks like it assumes these are always longitudes. I think we need to contemplate a situation where we can communicate to -JP the following
The angles are longitude: Formatting will be as for longitude.
The angles are latitude: Formatting will be as for latitude.
The angles are just angles: Formatting will be for angles with degree symbol only.
I am guessing we need to add a new modifier to -JP|p, e.g. +kkind, where kind may be x (longitude) or y (latitude). The default would just be degrees.
Alternatively, we use -f0x and -f0y instead to indicate the same information.
Thanks for the post. I guess GMT cannot know what the angular measures are, so it will need to be told. It looks like it assumes these are always longitudes. I think we need to contemplate a situation where we can communicate to -JP the following
1. The angles are longitude: Formatting will be as for longitude.
2. The angles are latitude: Formatting will be as for latitude.
3. The angles are just angles: Formatting will be for angles with degree symbol only.
I am guessing we need to add a new modifier to -JP|p, e.g. +kkind, where kind may be x (longitude) or y (latitude). The default would just be degrees.
Alternatively, we use -f0x and -f0y instead to indicate the same information.
Thanks for the post. I guess GMT cannot know what the angular measures are, so it will need to be told. It looks like it assumes these are always longitudes. I think we need to contemplate a situation where we can communicate to -JP the following
1. The angles are longitude: Formatting will be as for longitude.
2. The angles are latitude: Formatting will be as for latitude.
3. The angles are just angles: Formatting will be for angles with degree symbol only.
I am guessing we need to add a new modifier to -JP|p, e.g. +kkind, where kind may be x (longitude) or y (latitude). The default would just be degrees.
Alternatively, we use -f0x and -f0y instead to indicate the same information.
Thank you for your quick reply. I'm looking forward to the new modifier. By the way, do you know how to enable the axis label for JP? In this example, I used -Bya+l"Depth (km)" and but "Depth (km)" didn't show.
Activity
PaulWessel commentedon Apr 9, 2021
Thanks for the post. I guess GMT cannot know what the angular measures are, so it will need to be told. It looks like it assumes these are always longitudes. I think we need to contemplate a situation where we can communicate to -JP the following
I am guessing we need to add a new modifier to -JP|p, e.g. +kkind, where kind may be x (longitude) or y (latitude). The default would just be degrees.
Alternatively, we use -f0x and -f0y instead to indicate the same information.
Other thoughts on this, @joa-quim, @meghanrjones and @seisman ?
maxrjones commentedon Apr 9, 2021
This solution seems good to me.
seisman commentedon Apr 9, 2021
This makes more sense to me.
zhong-yy commentedon Apr 11, 2021
Thank you for your quick reply. I'm looking forward to the new modifier. By the way, do you know how to enable the axis label for
JP? In this example, I used-Bya+l"Depth (km)"and but "Depth (km)" didn't show.PaulWessel commentedon Apr 11, 2021
No such option at the moment. I am having a look.