Skip to content

Gallery example for configuring scale bar #2627

Closed

Description

@weiji14

Description of the desired feature

Realized from https://forum.generic-mapping-tools.org/t/customizing-gridlines-labels-and-scalebar-in-pygmt/4169 that we didn't have an example on how to configure a scale bar in PyGMT!

The example could follow along the lines of https://docs.generic-mapping-tools.org/6.4/cookbook/features.html#placing-map-scales, and show how to:

Starting example:

fig = pygmt.Figure()
with pygmt.config(MAP_SCALE_HEIGHT="20p"):
    fig.basemap(
        region=[-45, -25, -15, 0],
        projection="M6c",
        frame=True,
        map_scale="jBR+w1800k+o0.5c/0.5c+f+lkm",
    )
fig.show()

produces
map_scale_config

Bonus: The current documentation for fig.basemap(..., map_scale="") is currently very short, so we could also expand it, or at least link to https://docs.generic-mapping-tools.org/6.4/cookbook/features.html#placing-map-scales.

References:

Are you willing to help implement and maintain this feature?

No

Activity

  1. added
    good first issue
    documentation
    on Aug 12, 2023
  2. added this to the 0.11.0 milestone on Dec 25, 2023
  3. removed
    good first issue
    on Dec 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentation

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions