Conversation
See #6820 for background. This is a test branch for exploring this possibility. There are some remaining decisions to be made, hence the WIP.
|
I think only the last example, centered annotations, is of interest (that's what everybody would manually draw). If someone really wants the outside annotations, make a second call to |
|
The last panel is definitely the best looking one (IMO). But I'd keep the 0, especially foreseeing this remark :
After all, the "first" annotation is supposed to be easy to remove thanks to |
|
Annotating the center is asking for trouble. If one used a non 0/0 value then it double always overprint. Here is 0/0: I think from all the other annotations there is no need to do something complicated at the center since those values, whatever they are, could be spelled out in a figure caption or text etc., or just inferred from the other annotations. |
|
So, based on this limited feedback, the leading candidate is --MAP_FRAME_TYPE=graph-origin[,x/y] and it would only result in the last map as is. |
|
What about slightly shifting the annotation ? That would solve the grid overlap too |
This would need to involve font size, absolute values, spacing etc. It is not a fun thing to do. I think leaving it out is a good start. There is always text if people cannot figure out what those coordinates are. |
True. What about the |
|
Well, -B+e has no knowledge of any center coordinate to skip. One can image a -B+ec but the point is that nobody would want an annotation that prints on top of the axis and the other annotation, which brings us back to the "can we just shift it a bit". There is real agony in determine "a bit". |
Alright alright. You're the one doing the work here 🥇 |
|
I'm curious about the result with this showcase : |
|
Give it a try. I have updated the docs. For various reasons the syntax is --MAP_FRAME_TYPE=graph-origin[+ox/y] My complaints about unwanted ticks were silly since one can just select axis l and b to just get the vectors and w and s to add ticks. |
I don't see it in dev doc. |
|
Not merged - this is WIP branch only. - need to build that branch. |
I'm a simple man. |
|
Which tells me that if only one axis is selected we do not have to block the labeling of the origin since there is no overprint. |
Indeed. Do you throw an error if Joker asks for |
|
Not yet, but silently ignore anything but WwlSsb |
|
Still need to update the example plot in gmt.conf of the various basemaps to include the graph-origin. @gd-a example with both axis looks like this: I am unsure if we should automatically add to the title offset (the length of the extension) or if the user should use --MAP_TITLE_OFFSET. |
The secret to peace of mind. It looks neat ! (Well, except for the ugly plot lines) |
|
Agree that graph-origin is better (a little shorter). Another thing. Your example figure shows that the figures are small the fonts are still too big. |
|
Agree the fonts are too big here. Maybe it is a subplot thing? Anyway, separate issue from graph-origin. |
|
Given Joaquim's blind approval, it would be good if @seisman @Esteban82 and @meghanrjones give it a try first before I merge. |
|
|
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
No, I think that would be a problem. Lets say I use -R-10/20/-20/10. I would want the axes at the origin, but your default would place them at (5,-5) which is useless. So now I would have to add +o0/0 to make sure every time. I think it is better the other way, that you should have to do +o20/-15 instead. Perhaps a getter solution would be an optional +oc for "Center the axes on the given domain", with the default still being the origin at (0,0)? |
Sounds good to me. |
|
Please check again, @seisman. The +oc has been implemented and I fixed the lack of reset for unannotated axes. |







See #6820 for background (@gd-a). This is a test branch for exploring this possibility. There are some remaining decisions to be made (plus adding documentation), hence the WIP.
This matches the request for this command:
gmt basemap -R-20/20/-20/20 -JX5i -Bafg --MAP_FRAME_TYPE=graph-origin -png 1yielding
However, if you don't select grid lines (leaving off the g or just use default -B, you get
where the annotations look a bit naked. If you don't want any annotations or ticks you may try -Bws (lower case turns off annotation) but ticks persist even with -Ba2f0:
Some possibilities:
Finally, I can imagine some users wish to have centered annotated axes and leave out the (otherwise clobbered) zero annotation:
as shown in this mock-up. It would not be too hard to implement that. Do we call that MAP_FRAME_TYPE=graph-origin[,x/y] ?