Migrate list-based frame settings to Frame/Axis syntax across examples and docs#4536
Open
Migrate list-based frame settings to Frame/Axis syntax across examples and docs#4536
Conversation
60 tasks
…amples Replace list-style frame arguments with structured Frame and Axis class instances from pygmt.params in: - examples/gallery/lines/hlines_vlines.py - examples/gallery/lines/connection_lines.py - examples/gallery/lines/wiggle.py - examples/gallery/lines/envelope.py - examples/gallery/lines/line_custom_cpt.py Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: seisman <3974108+seisman@users.noreply.github.com>
…amples Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: seisman <3974108+seisman@users.noreply.github.com>
Replace list-based frame arguments with Frame and Axis class instances from pygmt.params in six example files: - examples/intro/01_first_figure.py: frame=["a", "+tMaine"] → Frame(title="Maine", axis=Axis(annot=True)); update prose comment - examples/intro/03_figure_element.py: migrate WStr+tTitle with x/y axes - examples/projections/nongeo/cartesian_linear.py: afg+gbisque → Frame - examples/projections/nongeo/cartesian_logarithmic.py: WSne+gbisque → Frame - examples/projections/nongeo/cartesian_power.py: WSne+gbisque → Frame - examples/projections/nongeo/polar.py: all six panel frame settings → Frame Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: seisman <3974108+seisman@users.noreply.github.com>
Convert all list-based frame parameters in tutorial files to use the Frame and Axis classes from pygmt.params, improving code readability and type safety. Files changed: - examples/tutorials/basics/frames.py - examples/tutorials/basics/text.py - examples/tutorials/advanced/3d_perspective_image.py - examples/tutorials/advanced/subplots.py - examples/tutorials/advanced/non_ascii_text.py - examples/tutorials/advanced/grid_equalization.py - examples/tutorials/advanced/cartesian_histograms.py - examples/tutorials/advanced/date_time_charts.py Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: seisman <3974108+seisman@users.noreply.github.com>
Replace legacy list-based frame specifications with Frame and Axis class instances from pygmt.params across multiple source and test files: - grdgradient_shading.py: Replace frame list with Frame(title=..., axis=Axis(...)) - helpers/testing.py: Update docstring example with Frame/Axis import and usage - src/grdview.py: Update docstring example with Frame/Axis import and usage - src/colorbar.py: Add Frame/Axis example to _build_frame docstring - tests/test_basemap.py: Migrate loglog and power axis frame lists to Frame/Axis - tests/test_config.py: Migrate simple af/xaf/yaf frame lists to Frame/Axis - tests/test_geopandas.py: Migrate WsNeZ1/xag/yag/zag frame list to Frame/Axis - tests/test_grdview.py: Migrate af/WSen and xaf/yaf/zaf frame lists to Frame/Axis Complex time-axis patterns (pa1K, sa1K, sxa1D, pa1Hg, sa45mg45m etc.) in test_config.py are left as lists to preserve their specific semantics. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: seisman <3974108+seisman@users.noreply.github.com>
…_config.py Agent-Logs-Url: https://github.com/GenericMappingTools/pygmt/sessions/65514bd5-9451-41a7-8207-35d7dba8919e Co-authored-by: seisman <3974108+seisman@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Migrate frame settings to the new Frame/Axis syntax
Migrate list-based frame settings to Frame/Axis syntax across examples and docs
Apr 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Many examples and docs still used legacy list-style
frame=[...]arguments. This migrates them to theFrame/Axisclasses frompygmt.params.Before / After
Files changed
lines/,symbols/,images/,seismology/01_first_figure.py,03_figure_element.py,cartesian_*.py,polar.pyframes.py,text.py,subplots.py,non_ascii_text.py,grid_equalization.py,cartesian_histograms.py,date_time_charts.pyhelpers/testing.py,src/grdview.py,src/colorbar.pytest_basemap.py,test_geopandas.py,test_grdview.py,test_config.py(simple patterns only)Intentionally left as lists
test_alias_system.pyternary.py,test_ternary.pya/b/caxes unsupported inFrame/Axistest_basemap.pyframe=[True, "WSen"]test_config.pypa1K/sa1K/pa1Hg/sa45mg45mFrameequivalent