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:
- Identify files or cases that still use string or list-based frame arguments
- Update them to use Frame/Axis where appropriate
- Verify that the updated examples render correctly
- Submit small, focused PRs
Below is a list of files that still use the list-based frame settings:
PyGMT now supports the newer
Frame/Axissyntax 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="' **/*.pygrep -R 'frame=\[' **/*.pyContributions are welcome! A good way to help would be to:
Below is a list of files that still use the list-based frame settings:
DOC/Gallery example "3-D bar plot": Migrate frame settings to the new Frame/Axis syntax #4496
DOC/Gallery example "Plotting a surface": Migrate frame settings to the new Frame/Axis syntax #4497
DOC/Gallery example "Plotting a surface": Migrate frame settings to the new Frame/Axis syntax; part 2 #4504
Frame: Allow setting 'axis' and 'zaxis' simultaneously #4498
DOC/Gallery example "3-D scatter plots": Migrate frame settings to the new Frame/Axis syntax #4502
DOC/Gallery example "Double Y-axes graph": Migrate frame settings to the new Frame/Axis syntax #4503
POC: DOC/Gallery example "Ternary diagram": Migrate frame settings to the new Frame/Axis syntax #4505
DOC/Gallery example "Colorbars": Migrate frame settings to the new Frame/Axis syntax #4506
DOC/Gallery example "Multiple colormaps": Migrate frame settings to the new Frame/Axis syntax #4507
DOC/Gallery example "Inset": Migrate frame settings to the new Frame/Axis syntax #4508
DOC/Gallery example "Inset map showing a rectangular region": Migrate frame settings to the new Frame/Axis syntax #4511
DOC/Gallery example "Legend": Migrate frame settings to the new Frame/Axis syntax #4512
DOC/Gallery example "Scale bar": Migrate frame settings to the new Frame/Axis syntax #4513
DOC/Gallery example "Blockmean": Migrate frame settings to the new Frame/Axis syntax #4514
DOC/Gallery example "Histogram": Migrate frame settings to the new Frame/Axis syntax #4521
params.Frame: Add parameters 'fill' for filling the base map #4520
DOC/Gallery example "Rose diagram": Migrate frame settings to the new Frame/Axis syntax #4522
DOC/Gallery example "Scatter plot with histograms": Migrate frame settings to the new Frame/Axis syntax #4523