Skip to content

Figure.basemap: Raise a warning on deprecated parameters "map_scale", "rose", and "compass"#4477

Merged
seisman merged 4 commits intomainfrom
fix-basemap-deprecations
Apr 1, 2026
Merged

Figure.basemap: Raise a warning on deprecated parameters "map_scale", "rose", and "compass"#4477
seisman merged 4 commits intomainfrom
fix-basemap-deprecations

Conversation

@seisman
Copy link
Copy Markdown
Member

@seisman seisman commented Mar 28, 2026

Raise a warning when any one of deprecated parameters map_scale/rose/compass is used:

In [1]: import pygmt

In [2]: fig = pygmt.Figure()

In [3]: fig.basemap(region=[127.5, 128.5, 26, 27], projection="H15c", frame=True, rose="jMC+w5c")
/Users/seisman/OSS/gmt/pygmt/pygmt/helpers/decorators.py:594: FutureWarning: The 'rose' parameter has been deprecated since v0.19.0. Use 'Figure.directional_rose' instead.
  return module_func(*args, **kwargs)

Also improve the docstrings slightly with the help from Codex.

Related to #4239.

Preview: https://pygmt-dev--4477.org.readthedocs.build/en/4477/api/generated/pygmt.Figure.basemap.html

@seisman seisman added this to the 0.19.0 milestone Mar 28, 2026
@seisman seisman added maintenance Boring but important stuff for the core devs needs review This PR has higher priority and needs review. labels Mar 28, 2026
@seisman seisman added final review call This PR requires final review and approval from a second reviewer and removed needs review This PR has higher priority and needs review. labels Mar 31, 2026
@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label Apr 1, 2026
@seisman seisman merged commit ca22361 into main Apr 1, 2026
19 of 22 checks passed
@seisman seisman deleted the fix-basemap-deprecations branch April 1, 2026 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Boring but important stuff for the core devs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant