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
Justification of map roses ignore space for label #6213
We can place a directional rose anywhere on the map via -T, and most easily via justification codes for the 12 points on the map. However, if labels are requested then two issues are apparent:
The default font used need to scale with the symbol and not be a fixed separate setting. Turns out this is FONT_TITLE which defaults to 24p,Helvetica,black. This is way too big for all but poster-size maps I think, so I am sure any users of -T also sets a smaller font that is suitable. In fact, our own example in the cookbook (GMT_obl_merc.sh) uses --FONT_TITLE=8p.
The space needed for the labels needs to be considered in the justification so they are not falling outside the map
Here is the what is happening now:
At least in modern mode that font should scale with the rose symbol size. For both classic and modern the offset should take into account the labels.
One issue with the current positional adjustments is that the same offsets seem to apply regardless of whether the labels are actually plotted. Here is an example from the PyGMT tests:
GMT main branch
GMT 6.3.0
gmt begin test png
gmt basemap -R0/9/0/9 -JC3/3/9c -TmjTL+w4c+d4.5
gmt basemap -TmjBR+w5c+d-4.5
gmt end show
After PR #6215 was merged, here are what the rose placements look like using the following test script:
gmt begin rose
gmt basemap -R-74/-69.5/41/43 -JM15c -Baf
for just in TL TC TR ML MC MR BL BC BR; do
gmt basemap -Tdj${just}+w1.5c
done
gmt end show
Plain roses without labels
Plain roses with labels (adding modifier +l)
Fancy roses without labels (adding modifier +f)
Fancy roses with labels (adding modifier +f+l)
@PaulWessel Because the changes in PR #6215 break a few PyGMT tests, could you please verify that the current placements of these roses are correct and the same as expected?
I guess the only thing that might need a 2nd look is the unlabeled roses. But we can see the spacing is different (smaller) than the case with WESN labels. The question is should it be even smaller. I assume that is what you are wondering? I see the code computes the same initial offsets for either rose, but clearly there are things later that must add more.
Let me know if this is the concern before I did into this.
Activity
maxrjones commentedon Mar 2, 2022
One issue with the current positional adjustments is that the same offsets seem to apply regardless of whether the labels are actually plotted. Here is an example from the PyGMT tests:
seisman commentedon Mar 6, 2022
Maybe related to this issue:
The direction rose is not plotted at the middler center (MC) of the map:

In the following command, I mistyped
+w5cas+5c:and I got the below figure. Perhaps GMT can do better at checking the syntax?

Fix incorrect auto-offset for centered roses
Fix incorrect auto-offset for centered roses (#6561)
seisman commentedon Apr 25, 2022
After PR #6215 was merged, here are what the rose placements look like using the following test script:
Plain roses without labels

Plain roses with labels (adding modifier

+l)Fancy roses without labels (adding modifier

+f)Fancy roses with labels (adding modifier

+f+l)@PaulWessel Because the changes in PR #6215 break a few PyGMT tests, could you please verify that the current placements of these roses are correct and the same as expected?
seisman commentedon Apr 25, 2022
Similarly, please also verify the placements of magmatic roses (especially the offset between the rose and the frames) are correct:
PaulWessel commentedon Apr 26, 2022
I guess the only thing that might need a 2nd look is the unlabeled roses. But we can see the spacing is different (smaller) than the case with WESN labels. The question is should it be even smaller. I assume that is what you are wondering? I see the code computes the same initial offsets for either rose, but clearly there are things later that must add more.
Let me know if this is the concern before I did into this.
seisman commentedon Apr 26, 2022
Yes, exactly. The spacing in PR #6626 looks better.
Here is the new image after applying PR #6626.

seisman commentedon Apr 26, 2022
Can we close the issue?
PaulWessel commentedon Apr 26, 2022
Yes, done