Create subplots

Create subplots#

Import the modules

[1]:
%%capture
%load_ext autoreload
%autoreload 2

from polartoolkit import fetch, maps

Define the region of interest and fetch the datasets

[2]:
%%capture

region = (-1800e3, -1000e3, -1200e3, -700e3)

bed = fetch.bedmap2(layer="bed", region=region)
gravity = fetch.gravity(version="antgg-update", anomaly_type="FA", region=region)
[3]:
fig = maps.plot_grd(
    bed,
    fig_height=10,
    grd2cpt=True,
    cmap="batlowW",
    coast=True,
    coast_pen="1p,black",
    cbar_label="Bedmap2 bed elevation",
    cbar_unit="m",
    gridlines=True,
    x_spacing=8,
    y_spacing=4,
    hist=True,
)

fig = maps.plot_grd(
    gravity,
    fig_height=10,
    grd2cpt=True,
    cmap="viridis",
    coast=True,
    coast_pen="1p,black",
    cbar_label="Free-air gravity",
    cbar_unit="mGal",
    origin_shift="yshift",
    yshift_amount=1.1,  # need extra shift due to colorbar
    fig=fig,
    inset=True,
    inset_pos="TR",
    gridlines=True,
    x_spacing=8,
    y_spacing=4,
    hist=True,
)


# display the figure
fig.show()
gmtset [WARNING]: Representation of font type not recognized. Using default.
gmtset [WARNING]: Representation of font type not recognized. Using default.
../_images/gallery_subplots_5_1.png
[ ]: