Skip to content

Add another gallery example for inset #1018

@seisman

Description

@seisman

Currently, we already have a good and nice inset example at https://www.pygmt.org/v0.3.0/gallery/plot/inset.html. This example doesn't cover all use cases of insets.

Another common use case is plotting a rectangle in the inset map to show the area of the main figure. Below is an example (originally from https://docs.gmt-china.org/latest/tutorial/inset/):

image

The corresponding bash script is:

#!/usr/bin/env bash
gmt begin inset-map png,pdf
    gmt coast -R139.2/140.5/34.8/36 -JM12c -Baf -BWSne -W2p -A1000 -Glightbrown -Sazure1 --FORMAT_GEO_MAP=dddF
    gmt inset begin -DjBL+w3c/3.6c+o0.1c -F+gwhite+p1p
        gmt coast -R129/146/30/46 -JM? -EJP+glightbrown+p0.2p -A10000
        echo 139.2 34.8 140.5 36 | gmt plot -Sr+s -W1p,blue
    gmt inset end
gmt end show

We should add a gallery example for this use case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationhelp wantedHelping hands are appreciated

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions