Add the Frame/Axis class for setting frame and axes [Part 1] #4406
+209
−0
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.
This PR implements the
Frame/Axisclass for setting frame and axes attributes. It's a subset of PR #4016 because the-Boption is complicated, and it will take a long time to finish #4016, which again will delay the paper submission.Currently, only a small subset of the
-Boption is implemented in this PR, but it should already cover most use cases.Here is a comparison table between the GMT CLI and the PyGMT versions:
-Bframe=True-BWSENframe=Frame("WSEN")orframe=Frame(axes="WSEN")-BWSEN+tMY TITLEframe=Frame("WSEN", title="MY TITLE")-Baframe=Axis(annnot=True)-Bafgframe=Axis(annot=True, tick=True, grid=True)-Ba30f15g5frame=Axis(annot=30, tick=15, grid=5)-Ba30f15g5+lLABELframe=Axis(annot=30, tick=15, grid=5, label="LABEL")-BWSEN+tTITLE -Bxa30f15g5+lXlabel -Bya4f2g1+lYlabelframe=Frame("WSEN", title="TITLE", xaxis=Axis(annot=30, tick=15, grid=5, label="Ylabel"), yaxis=Axis(annot=4, tick=4, grid=1, label="Ylabel"))This PR doens't break backward-compatibility, so
frame="WSEN",frame="afg",frame="a30f15g5",frame=["WSEN+tTITLE", "xafg", "yafg"]are still supported.