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
-X/-Y other than default relative are broken ? #6291
gmt begin test png
gmt basemap -JX10c -R0/1/0/1 -B+gblack
gmt basemap -JX5c -R0/1/0/1 -B+ggreen -X10c -Y10c
gmt basemap -JX5c -R0/1/0/1 -B+gred -Xa10c -Ya5c
gmt basemap -JX5c -R0/1/0/1 -B+gblue -Xf5c -Yf10c
# gmt basemap -JX3c -R0/1/0/1 -Bafg -Xc -Yc # << this one is out of control !
gmt end show
Maybe @remkos remembers anything about -Xf -Yf? Or perhaps this was Florian's invention. I think bottom line is that there is nothing in the code that checks for 'f' and in fact if I run the example above I do not get that plot...
I think -Xc -Yc was only intended to be used once with the first command
But everything is relative to the first command... and the first command is always centred ...
We recommend either using -Xa -Ya for everything or doing everything relative -X -Y or -Xr -Yr
For complex plots, -Xa is easier to deal with (cf the plot on the forum), but it is almost impossible to do without -X(r):
Automatic legend uses it
Every command using -D (inset...) uses it as a shortcut ... It is always possible to manually position it too with -Dx but the code gets unnecessarily heavy (IMO)
more concerning, following plots don't respect the previous -Xa positioning, forcing repetition every line.
gmt begin test png
gmt basemap -R0/1/0/1 -JX10c -Bafg
gmt basemap -B+gred -Xa11c -Ya11c
gmt basemap -B+gblue
gmt end show
and in fact if I run the example above I do not get that plot...
O.O Me neither !
I just reinstalled the latest version and the plot indeed changed, but for the worst. Now the blue square is even further south east. Nevertheless it doesn't work as it should ("as I think it should" should I say)
bottom line is that there is nothing in the code that checks for 'f'
In fact, now 'f' and 'c' behave in a similar way (making very veeeeeerrrrryyyy stretched plots)
Maybe @remkos remembers anything about -Xf -Yf? Or perhaps this was Florian's invention. I think bottom line is that there is nothing in the code that checks for 'f' and in fact if I run the example above I do not get that plot...
It was indeed me you introduced it in GMT5 on 14 Jun 2011. Maybe some of the code got broken since. I will check.
I have the strong feeling that the code to handle the 'f' case was removed when the code that did this in gmt_plot.c was ported to subplot.c where this seems to be handled now.
So it is best that it is restored there by those who wrote subplot.c
Activity
gd-a commentedon Feb 2, 2022
Also -X isn't relative to last -Xa call
gd-a commentedon Feb 3, 2022
^ also messes up the automatic legend entry (
-l) positionPaulWessel commentedon Feb 4, 2022
Before looking in detail the default answer is:
PaulWessel commentedon Feb 4, 2022
Maybe @remkos remembers anything about -Xf -Yf? Or perhaps this was Florian's invention. I think bottom line is that there is nothing in the code that checks for 'f' and in fact if I run the example above I do not get that plot...
gd-a commentedon Feb 4, 2022
But everything is relative to the first command... and the first command is always centred ...
For complex plots,
-Xais easier to deal with (cf the plot on the forum), but it is almost impossible to do without-X(r):-D(inset...) uses it as a shortcut ... It is always possible to manually position it too with-Dxbut the code gets unnecessarily heavy (IMO)-Xapositioning, forcing repetition every line.O.O Me neither !
I just reinstalled the latest version and the plot indeed changed, but for the worst. Now the blue square is even further south east. Nevertheless it doesn't work as it should ("as I think it should" should I say)
In fact, now 'f' and 'c' behave in a similar way (making very veeeeeerrrrryyyy stretched plots)
remkos commentedon Mar 15, 2022
It was indeed me you introduced it in GMT5 on 14 Jun 2011. Maybe some of the code got broken since. I will check.
remkos commentedon Mar 15, 2022
I have the strong feeling that the code to handle the 'f' case was removed when the code that did this in gmt_plot.c was ported to subplot.c where this seems to be handled now.
So it is best that it is restored there by those who wrote subplot.c
gd-a commentedon Mar 8, 2023
Now hidden under classic mode :)