Is it possible to left justify annotations on the right (E) side of the plot?

I’m plotting a diagram in cartesian space, and because of a break in the Y-axis, and for general aesthetic reasons, I would like to be able to left-justify the annotations plotted on the right-hand-side (E) on the Y axis. See the attached image as an example: in this case, I think the plot would simply look nicer if the right side Y axis annotations were left-justified, even if that isn’t “correct” in the sense of aligning the values, but the values aren’t aligned anyway, because of the break in scale.

@pwessel @Joaquim

It seems the question is forgotten. I’m also curious if there is a solution to this. I tried to change FORMAT_FLOAT_MAP, but it doesn’t work as I expect.

gmt basemap -R0/10/0/1000 -JX10c/10c -BWSEN -Baf -pdf map --FORMAT_FLOAT_MAP='%-.12g'
1 Like

This isn’t the cleanest way, in that it would be nicer to use something like FORMAT_FLOAT_MAP, but it is possible to use plot custom axis labels using text, where the x-values should be constant and adjusted based on the x-axis scale:

gmt text -F+jML -N << EOF
-1 0 0
-1 10 10
-1 20 20
-1 30 30
EOF

We did not implement something like that because we (subjectively, I know) felt it would look ugly. We spend much effort figuring out the base alignment, sometimes via PostScript math inside the plots, to arrive at what we show, and those strings are right-justified for that axes. Introducing left justification means more programming for a very unlikely situation - so perhaps the custom annotation scheme is not so bad. I am certainly not highly motivated to look at this in detail give all the other tasks on my plate.

Thank you all for your comments and suggestions.

Indeed I thought about using pstext (sorry I’m still an old-school GMT’er), and seeing as how this is probably the only solution available at the moment, I will use that. It is easy enough to implement, as there are not that many labels to plot and they can be generated automatically in the shell script.

Cheers, Jed