Hi there.
Is the anyway to increase the thickness of frame around the figure?
have a look at gmtdefaults for settings starting MAP_FRAME_
Hello @mtabbakhha,
as mentioned by @biggle1856 changing the frame thickness of a map can be accomplished by configuring the GMT default values. An overview of all available GMT default parameters can be found at gmt.conf — GMT 6.4.0 documentation (generic-mapping-tools.org).
Below, please find a code example how to change the frame thickness in PyGMT. For a more detailed introduction on configuring GMT defaults within PyGMT, you may also want to have a look at this PyGMT tutorial Configuring PyGMT defaults — PyGMT.
Code example:
import pygmt
fig = pygmt.Figure()
# global changes of GMT default values
pygmt.config(
MAP_FRAME_WIDTH="10p",
MAP_FRAME_TYPE="fancy",
)
fig.basemap(
region=[0, 10, 0, 10],
projection="M10c",
frame="afg",
)
fig.show()
# fig.savefig(fname="frame_thickness.png")
Output figure:
Thank you very much for your response. I have one more question. I need to add some white margin around the map in all 4 directions (top bottom left right). Can you please help me how to do that?
You can use the crop parameter for Figure.show / Figure.savefig:
fig = pygmt.Figure()
fig.basemap(region=[0, 1, 0, 1], frame=True, projection="X10c")
fig.show(crop="10c")
