-
Notifications
You must be signed in to change notification settings - Fork 348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
plot -Sf gap - unwanted size change #2995
Comments
Some further experimentation lead me to believe that this might actually be an intentional feature. By sightly nudging the gap size the line terminates on a symbol making for a nice line end. This is hardly noticeable at small symbol sizes but gets very obvious at larger sizes as shown above.
See this heavily zoomed in crop of above test: The uneven gap is always there, it just get less and less noticeable the smaller the symbol gets. I would have never noticed this if not for my attempt for a checkered line. Can someone confirm my suspicions? |
Remember that for geographic data, the default behavior is to resample crude paths with great-circle resampling. This can be modified or turned off with -A. So here, the paths you are prescribing are not the ones being used inside plot. Please try with -A and see if there are any issues then, |
Hi @PaulWessel, I tried again with
Same result when using |
Thanks, @KristofKoch. If you want to be sure you can plot your points as well with and without -A and see if they differ. |
I have the feeling I'm not understanding your argument but I do not see how the points could be influenced by
Crop from resulting plot - they match perfectly |
I mean where the points plot with vs without -A. |
My apologies @PaulWessel, but I think I still don't understand it. You mean comparing the placement of the two points from the textfile? This is what I tried with the exaggerated bullseye above: black without |
Looking at the source code for gmt_draw_front:
So looks like we are marching along the line in steps of gap, which can differ from the given gap (f_gap) and that difference is likely to be larger fro fewer gaps. |
So my suspicions were right – the user supplied gap is more of a "recommendation". As far as I understand gmt_plot.c (no real C experience) there is no way to easily force an exact gap. Thank you for pointing that out, @PaulWessel Is there a way to suppress the plotting of the line? Something like |
Thanks @KristofKoch, I will look at the front symbol option for improvements. It should be possible to not draw the line. You are probably aware of the decorated symbol option as well (-S~); is that of interest to you as well? |
For some inexplicable reason I wasn't aware of head -> desk (repeatedly) This promises to solve quite a few headaches (not the head banging – the Thank you, @PaulWessel - now I have a lot to test and experiment. And thank you for looking into |
If the front gap is specified with an explicity plus-symbol then we take taht to mean the gap should be used as is. The default remains to distribute ticks exactly along the liine and thus adjust the gap accordingly. See #2995 for context.
* Let positive front gaps be used as given If the front gap is specified with an explicity plus-symbol then we take taht to mean the gap should be used as is. The default remains to distribute ticks exactly along the liine and thus adjust the gap accordingly. See #2995 for context. * Update gmt_init.c
Hi @KristofKoch, I will close this one for now. Feel free to open an issue about allowing the lines in quoted, decorated, and front to be invisible. |
Description of the problem
When using
-Sf
the size of the gap between the symbols changes depending on supplied path.Full script that generated the error
Actual outcome
The two different paths lead to two different gap sizes all other things being the same.
Expected outcome
I expected the gaps to be as wide as the boxes and not changing size depending on supplied path in an unpredictable manner.
System information
The text was updated successfully, but these errors were encountered: