I know I’m doing something silly here but I just can’t seem to figure it out, possibly it’s the end of the day or I just an idiot. Probably a bit of column ‘a’ and ‘b’. Nonetheless, any insight would be most appreciated.
I’d like to plot a geographic vertical cross-section gridded contour dataset above it’s horizontally sliced ‘surface’ map. My attempts are nearly there but the horizontal map is not filling out it’s bounding box – see figure below. Can anyone see where I’m going wrong?
Here is my figure:
I’m generating using this code:
fig = pygmt.Figure()
pygmt.makecpt(cmap="imola", reverse=True, series=[minval,maxval,stpval])
with fig.subplot(nrows=2, ncols=1, figsize=("20c", "20c"), margins=["0.1c","0.2c"] ,
frame="WSne", title="{} at {}".format(tit_str_left,tit_str_right) ):
with fig.set_panel(panel=0):
fig.grdimage( grid=den_tm , frame=["Wsne","yaf+lDepth"] , projection="X?", region=reg_den , cmap=True , transparency=20 )
fig.colorbar( position="JMR+o0.5c/0c+w20c" , frame=["x+ldensity","y+lkg/m^3"] )
with fig.set_panel(panel=1):
den_h = self.slice_dataset_horizontally(ds=ds.dens.sel(zc=0,method='nearest'),ds_name=ds_name)
den_t = self.slice_dataset_temporally( ds=den_h , ds_name=ds_name , ext=[d] , by_index=False )
fig.basemap(region=map_extent,frame="WSne")
fig.grdimage(grid=den_t, projection="M?",cmap=True,transparency=20)
fig.coast(shorelines=".5p",land="#666666")
fig.image(self.FUNIT_BADGE,position="JTL+w3c")
fig.logo(position='JBL')