I’m plotting hundreds of maps using PyGMT, all in Cartesian coordinates. I’m setting the tick labels to be inside the frame using MAP_FRAME_TYPE='inside'. Since there are so many maps, I need this configuration to work automatically without customizing each map individually.
However, I’ve encountered an issue: when I add a title to the map, the tick labels sometimes appear outside the frame (see the example below). If I don’t include a title, the tick labels are clipped and stay within the frame.
Is there a way to ensure the tick labels remain inside the frame, even when adding a title?
Here is a minimal code example to reproduce the issue:
they mean exactly. annotation that don’t fall exactly at the ends aren’t skipped
for the topic starter it might be the easiest to define the range aligned with half of his tick interval, something like region=[314408.4021, 319608.4021, 8763500, 8769500]
x range boundaries fall fall approximately at the half so no hanging labels
@Esteban82@mkononets Thank you for the suggestions. Apparently, I will have to follow what @mkononets suggested. However, my maps are centered on a point (x, y), and I have a list with several x and y values. The region is calculated by applying an offset to the coordinates x−2600,x+2600,y−2600,y+2600x-2600, x+2600, y-2600, y+2600x−2600,x+2600,y−2600,y+2600. I do this to ensure that all maps have the same extent in both x and y. Using the suggested approach and aligning the range with half of his tick interval, I’m not sure if I can ensure that each map has the same horizontal and vertical size in meters.
my quick code is wrong, in a way that it will align y_min/max with 500 and also with 1000 as 1000=2*500. But it can be modified to always provide …500 values.
… or the +e modifier can be used so the exact boundary tick labels will be skipped, but it will look less nice as with the range boundaries aligned in the middle of tick interval: