Skip to content

Migrate frame settings to the new Frame/Axis syntax across examples and docs #4494

@seisman

Description

@seisman

PyGMT now supports the newer Frame/Axis syntax for frame settings (#4406), although it is still not feature-complete. However, many examples and documentation pages continue to use the legacy string- or list-based frame arguments. It would be beneficial to migrate these usages so that the codebase consistently demonstrates and promotes the newer syntax.

I'm still debating whether to continue supporting string-style frame settings (e.g., frame="WSen", frame="afg"), considering that they're simple and widely used. However, at a minimum, list-style frame settings should be migrated to the Frame/Axis classes.

For example:

  • frame=["xa10", "ya5", "+tTitle"] => frame=Frame(xaxis=Axis(annot=10), yaxis=Axis(annot=5), title="Title")

To locate remaining usages of string- or list-based frame settings, you can use:

  • grep -R 'frame="' **/*.py
  • grep -R 'frame=\[' **/*.py

Contributions are welcome! A good way to help would be to:

  1. Identify files or cases that still use string or list-based frame arguments
  2. Update them to use Frame/Axis where appropriate
  3. Verify that the updated examples render correctly
  4. Submit small, focused PRs

Below is a list of files that still use the list-based frame settings:

Metadata

Metadata

Labels

help wantedHelping hands are appreciatedmaintenanceBoring but important stuff for the core devs

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions