Skip to content
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

Gallery example for configuring scale bar #2627

Closed
weiji14 opened this issue Aug 12, 2023 · 0 comments · Fixed by #2822
Closed

Gallery example for configuring scale bar #2627

weiji14 opened this issue Aug 12, 2023 · 0 comments · Fixed by #2822
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@weiji14
Copy link
Member

weiji14 commented Aug 12, 2023

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

@weiji14 weiji14 added good first issue Good for newcomers documentation Improvements or additions to documentation labels Aug 12, 2023
@seisman seisman added this to the 0.11.0 milestone Dec 25, 2023
@seisman seisman removed the good first issue Good for newcomers label Dec 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants