Proper positional adjustment of directional rose due to labels#6215
Proper positional adjustment of directional rose due to labels#6215PaulWessel merged 39 commits intomasterfrom
Conversation
Also, for modern mode reset the text font and offset based on symbol size.
Also add test script dir_roses.sh
|
Keeping the auto-scaling to modern mode in line with other auto-scalings sounds good to me. |
* Let map roses have a default size of 10% of map width This PR makes +wwidth optional for magnetic and directional roses. if not given we default to 10% of the map width. Alternatively, give +w with % as unit to change this value. Closes #6211 * Set 15 and 8 % as default sizes
|
Ping @Esteban82, @joa-quim and @meghanrjones. I have implemented auto-scaling for the magnetic rose as well. Please build from this branch and use this script to explore and give feedback on the scalings I chose. FYI, I set the scales so that for size 2.5i (the original script) the roses looks similar. For smaller sizes things scale down accordingly: See gmt_plot.c line 3308 for where the scales are - feel free to experiment changing those numbers if you think they can be improved. Note: I have not yet dealt with positions and adjustments due to text size as I have done for directional rose - that comes later. |
|
Would auto-scaling for the intervals typically set using +t be possible? Or an option to apply MAP_ANNOT_MIN_SPACING to those? |
|
NZ: These are tiny maps (3i) so default symol is 0.3 inches or about 0.75 cm. It is small - the original had a fixed 0.5i symbol. I can restore to 0.5i but will still fail due to (now) correct placement. This figure is included in the cylindrical doc section so we do want it to be readable. OK, have set it back to 0.5i since the script is not shown anyway. There have been no change to which font is used, only size of that font. |
|
TYpo in script, now same size. |
Do you mean that you prefer the current behavior in this PR of MAP_EMBELLISHMENT_MODE overriding FONT_TITLE settings? |
|
Yes, because I do not know how to track what was set manually. Remember, this is after the auto-scaling of fonts etc have already been set for the map. So without a set of book-keeping I would not know if I should not change the font-size because the user wanted 24p. They can change the font, but not manually set a size and still benefit from all the other auto-things. I think the vast amount of users will be pleased they dont have to think about these settings, and a few may wish to do things entirely manually. |
|
OK, I think it's good to go after removing the now irrelevant settings from the scripts. |
Comment out a debug section
|
FYI: This PR got delayed a bit because the alignment of the N-arrow in example 4 was off. The solution is to temporarily reset the PostScript matrix projection, compute the offsets, then reinstate the projection (the -p60/30 as implemented in PostScript) as the offsets need to be measured without perspective. Now, ex04 has a good default placement and size I think. About 8 tests related to map roses, including some new tests with no PS files, fail. I think we will add these to dvc soon. |

See #6213 for background. This PR does a few things and raises a question (at the end):
This addresses the main concern in #6213. The PR does a few more things for modern mode:
Both of those fractions are up for discussion and refinement. Also, the classic defaults for font size (FONT_TITLE) and offset (MAP_TITLE_OFFSET for fancy and (curiously) MAP_ANNOT_OFFSET for plain) are much too large and furthermore inconsistent. We could either declare a bug here or just keep the auto-scaling to modern mode in line with other auto-scalings.
Happy to take comments on this. Below is a new test. There is one tiny issue remaining: The S label is still clipped and I cannot yet see why this can happen...