I am making the inset figure that shows wide region that contains main figure.
Following basic tutorial that is provided for making inset, I could successfully create one, but I am having trouble showing latitude/longitude grids for the inset figure. I could not find any example related to it, so I am asking here.
My PyGMT version is the latest stable version (v0.6.1).
I attach the code below:
fig=pmt.Figure()
pmt.config(MAP_FRAME_TYPE="plain") # No fancy boundary
pmt.config(FORMAT_GEO_MAP="ddd.x") # Display latitude/longitude upto 1st decimal point
# Set the region to show (latitude/longitude min/max range)
subset_region=[126.5, 129.0, 34.0, 36.2]
fig.basemap(region=subset_region, projection="M15c", frame=["WSne", "xaf", "yaf"])
fig.coast(land="lightgrey", water="lightskyblue", shorelines="1/0.5p", map_scale="n0.85/0.075+l+c127.7/34.95+w50")
with fig.inset(position="jTL+w8.4c/5.6c+o0.5c", box="+p1.5p"):
# Set the region to show (latitude/longitude min/max range)
inset_region=[115.0, 150.0, 30.0, 48.0]
fig.basemap(region=inset_region, projection="M15c", frame=["WSne", "xaf", "yaf"])
fig.coast(land="lightgrey", water="lightskyblue", borders=["1/0.2p,black"], shorelines="1/0.5p", map_scale="n0.85/0.15+l+c127.7/34.95+w500")
###### Box encompassing the large area ######
rectangle = [[subset_region[0], subset_region[2], subset_region[1], subset_region[3]]]
fig.plot(data=rectangle, style="r+s", pen="2p,red")
# fig.savefig(fname="Station_map_tectonic_inset.pdf", dpi=500)
fig.show(width=1000)
The figure that is currently reproduced is the following: