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
Directional roses are plotted at bottom-left (x0/0) by default, but it seems the anchor point is "BL" for a simple rose and "MC" for a fancy rose. So, the behavior is inconsistent.
The box is not drawn for the simple rose when the position is x0/0
Setting position to jBL looks good, but the box for the simple rose seems to be a square which doesn't fit the simple rose well.
Another issue is the default width. The GMT docs say the default width is 10%, but the following script crashes
gmt begin map png
gmt basemap -R100/110/30/35 -JM10c -Baf
gmt basemap -Tdx0/0 -F+pblue
gmt basemap -Tdx0/0+f -F+pred
gmt end show
The error message is:
basemap [ERROR]: Option -T: Correct syntax
basemap [ERROR]: -T[f|m][x]<x0>/<y0>/<size>[/<info>][:wesnlabels:][+<gint>[/<mint>]]
basemap [ERROR]: Could not decode dx0, return NaN.
basemap [ERROR]: Option -T: Could not parse geographic coordinates dx0 and/or 0
basemap [WARNING]: not a valid number and may not be decoded properly.
basemap [ERROR]: Option -T: Size must be positive
basemap [ERROR]: Option -T: <kind> must be 1, 2, or 3
The default width works well if position is not x0/0. I think it's because when x0/0 is used, GMT fallback to the old GMT syntax, which doesn't have default width set.
Things changed after #9074. And I don't get any error Could not decode dx0, return NaN. There are still differences fancy/nofancy but are they bugs? (didn't investigate it).
The panel is always square instead of matching the rose's actual footprint. This one's straightforward to fix. I will make a PR soon.
The plain (simple) north rose is always forced to stay inside the map frame. I think this clamp only exists for the plain rose type and it was implemented for the cases when a rose sits near a corner/edge and gets rotated (e.g. for oblique projections, or just non-north-up local declination), this keeps the whole plain-rose symbol visible instead of letting part of it spill past the frame. I have a patch that simplifies this else function to fix this.
That inside-the-map shift is never applied to the panel: The blue box stays at the originally requested position while the rose itself gets nudged inward.
Proposed fixes:
For 2 is trickier — it's not really a bug, it's an intentional feature. This will break back-ward compatiliby and maybe probably break some tests. I suspect it's quite old (since it only applies to simple north directions). I even think it predates the jBL mechanism. I'd be in favor of breaking this compatibility. I consider it a bug that you can't plot "north" outside the map.
3 is also easy to solve (once we decide what to do with 2).
Please let me know your specific opinion regarding point 2.
think this clamp only exists for the plain rose type and it was implemented for the cases when a rose sits near a corner/edge and gets rotated (e.g. for oblique projections, or just non-north-up local declination), this keeps the whole plain-rose symbol visible instead of letting part of it spill past the frame.
But why does the fancy rose not forced inside the frame?
I'm not sure. I suspect that maybe at the time, Paul? forgot to implement it for the “fancy rose.” Or, for some specific reason (perhaps related to the fact that the “fancy rose” is square and the “simple” one isn't). I could try to find out when it was implemented. Or maybe Joaquim knows.
Activity
joa-quim commentedon Jul 1, 2026
Things changed after #9074. And I don't get any error
Could not decode dx0, return NaN. There are still differences fancy/nofancy but are they bugs? (didn't investigate it).Esteban82 commentedon Jul 7, 2026
I looked into this issue. The problems are easier to reproduce with this command:
gmt psbasemap -R100/110/30/35 -JM10c -Baf -TdJBL+w2c -F+pblue -png bugThis shows three related issues,
Proposed fixes:
Please let me know your specific opinion regarding point 2.
Esteban82 commentedon Jul 11, 2026
@joa-quim. @seisman any comments on issue 2 ("the simple north is forced to stay inside")?
seisman commentedon Jul 11, 2026
But why does the fancy rose not forced inside the frame?
Esteban82 commentedon Jul 11, 2026
I'm not sure. I suspect that maybe at the time, Paul? forgot to implement it for the “fancy rose.” Or, for some specific reason (perhaps related to the fact that the “fancy rose” is square and the “simple” one isn't). I could try to find out when it was implemented. Or maybe Joaquim knows.