Skip to content

Update the inset gallery example #1287

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
May 28, 2021
13 changes: 9 additions & 4 deletions examples/gallery/embellishments/inset.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,17 @@
# "brown", the water to "lightblue", the shorelines width to "thin", and adding a frame
fig.coast(region="MG+r2", land="brown", water="lightblue", shorelines="thin", frame="a")
# Create an inset, setting the position to top left, the width to 3.5 centimeters, and
# the x- and y-offsets to 0.2 centimeters. The margin is set to 0, and the border is "gold".
with fig.inset(position="jTL+w3.5c+o0.2c", margin=0, box="+pgold"):
# the x- and y-offsets to 0.2 centimeters. The margin is set to 0, and the border is "gold"
# with a pen size of 1.5p.
with fig.inset(position="jTL+w3.5c+o0.2c", margin=0, box="+p1.5p,gold"):
# Create a figure in the inset using coast. This example uses the azimuthal
# orthogonal projection centered at 47E, 20S. The land color is set to "gray" and
# Madagascar is highlighted in "red".
# Madagascar is highlighted in "red3".
fig.coast(
region="g", projection="G47/-20/3.5c", land="gray", water="white", dcw="MG+gred"
region="g",
projection="G47/-20/?",
land="gray",
water="white",
dcw="MG+gred3",
)
fig.show()