You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR aims to adjust the arguments passed to the annotation and levels parameters of Figure.contour:
input options
- a fixed interval als float 100 -> 100
- one level as list: [100] -> 100, (mention the trailing comma)
- multiple levels as list: [100, 200] -> 100,200
- no as string: "n" -> n (syntax of GMT 6.5)
Update docstrings
Add tests for interval, one level, and multiple levels
Both parameters are very complicated and the current docstrings are too simple.
OK, I will try to find time to expand the docstrings for the annotation and the levels or interval parameters of Figure.contour and Figure.grdcontour following the upstream GMT documentation.
yvonnefroehlich
changed the title
Figure.contour, Figure.grdcontour: State all allowed input types for "annotation" and "levels" / "interval"
Figure.contour, Figure.grdcontour: Expand docstrings for "annotation" and "levels" / "interval"
Oct 2, 2023
yvonnefroehlich
changed the title
Figure.contour, Figure.grdcontour: Expand docstrings for "annotation" and "levels" / "interval"
WIP: Figure.contour, Figure.grdcontour: Expand docstrings for "annotation" and "levels" / "interval"
Oct 2, 2023
For me, the parameters levels and interval appear quite similar / identical. I am wondering whether there is a difference, which explains the different long parameter names.
This is actually related to issue #1042 by @maxrjones. I am wondering whether we should decide on one of these two aliases and deprecate the other one (in a separate PR).
yvonnefroehlich
changed the title
WIP: Figure.contour, Figure.grdcontour: Expand docstrings for "annotation" and "levels" / "interval"
Figure.contour: Update documentation of "annotation" and "levels"
Mar 20, 2024
yvonnefroehlich
changed the title
Figure.contour: Update docs of "annotation" and "levels" parameters
Figure.contour: Adjust processing the agruments passed to the "annotation" and "levels" parameters
Apr 26, 2024
I fell is can be confusing to have an alias interval but pass specific levels, or an alias levels but pass an fixed interval.
So, maybe contours would be a better alias for C (see also https://docs.generic-mapping-tools.org/dev/grdcontour.html#c)?
Maybe we should complete the PRs #2706 and #3116 regarding the allowed input format, and then discuss this in more detail if these two deprecations are worth it?
I fell is can be confusing to have an alias interval but pass specific levels, or an alias levels but pass an fixed interval.
So, maybe contours would be a better alias for C (see also https://docs.generic-mapping-tools.org/dev/grdcontour.html#c)? Maybe we should complete the PRs #2706 and #3116 regarding the allowed input format, and then discuss this in more detail if these two deprecations are worth it?
weiji14
changed the title
Figure.contour: Adjust processing the agruments passed to the "annotation" and "levels" parameters
Figure.contour: Adjust processing of arguments passed to the "annotation" and "levels" parameters
Apr 27, 2024
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
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
This PR aims to adjust the arguments passed to the
annotationandlevelsparameters ofFigure.contour:- a fixed interval als float
100->100- one level as list:
[100]->100,(mention the trailing comma)- multiple levels as list:
[100, 200]->100,200- no as string:
"n"->n(syntax of GMT 6.5)Related:
annotation: https://docs.generic-mapping-tools.org/dev/contour.html#ainterval: https://docs.generic-mapping-tools.org/dev/contour.html#cFigure.grdcontour: Figure.grdcontour: Adjust processing of arguments passed to the "annotation" and "interval" parameters, deprecate "sequence_plus" #3116Preview: https://pygmt-dev--3116.org.readthedocs.build/en/2706/api/generated/pygmt.Figure.contour.html
Reminders
make formatandmake checkto make sure the code follows the style guide.doc/api/index.rst.Slash Commands
You can write slash commands (
/command) in the first line of a comment to performspecific operations. Supported slash commands are:
/format: automatically format and lint the code/test-gmt-dev: run full tests on the latest GMT development version