Repository navigation
Conversation
Describe how the figure and subplot dimensions are derived from each other, how to set different widths/heights per column/row (+f fractions for figsize, comma-separated lists for subsize), how the subplot height is computed from region and projection for geographic maps, and the +a, +c, +g, +p and +w modifiers. The wording follows the current GMT subplot documentation.
This branch has not been deployed
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.
Description of proposed changes
The docstrings of the
figsizeandsubsizeparameters ofFigure.subplotwere only one-liners. This PR expands them, following the current GMTsubplotdocumentation (the text suggested in the issue is from GMT 6.2). They now describe:+ffractions forfigsize, comma-separated lists forsubsize),regionandprojectionfor geographic maps (this only works withsubsize, as in GMT),+a,+c,+g,+pand+w.I also changed the type lines from
listtotuple or str, because strings are needed for the modifiers and lists, and the docstring example already uses a tuple. Happy to revert that if you prefer.Only the docstring changes, no code.
How it was checked: I don't have GMT installed (Windows), so nothing was run against a real GMT. With Claude Code I checked that ruff, the pre-commit hooks, codespell and typos pass. I also checked that the docstring renders without docutils or Sphinx napoleon warnings. With the GMT session stubbed out, PyGMT builds the expected command lines (e.g.
-Ff10c/10c+f3,1/1,2and-Fs5c,8c/8c). I compared the statements with the GMT docs and with GMT'ssubplot.c. The docs CI build will be the first full build.This change was prepared with Claude Code (Claude Sonnet 5.5).
Fixes #1370
Preview:
Guidelines
Slash Commands
You can write slash commands (
/command) in the first line of a comment to performspecific operations. Supported slash command is:
/format: automatically format and lint the code