Skip to content

Figure.grdcontour: Adjust processing of arguments passed to the "annotation" and "interval" parameters, deprecate "sequence_plus" #3116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 54 commits into from
Apr 27, 2024
Merged
Changes from 10 commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
a3fa214
Use list instead of tuple
yvonnefroehlich Mar 16, 2024
ee143e6
Merge branch 'main' into fix-typos-63-grdcontour
yvonnefroehlich Mar 17, 2024
e59f077
Merge branch 'main' into fix-typos-63-grdcontour
yvonnefroehlich Mar 18, 2024
05b5abb
Remove list input option for annotation parameter
yvonnefroehlich Mar 19, 2024
99dc353
Merge branch 'main' into fix-typos-63-grdcontour
yvonnefroehlich Mar 19, 2024
731d014
Fix line length
yvonnefroehlich Mar 19, 2024
c8b805b
Update syntax to GMT 6.5
yvonnefroehlich Mar 19, 2024
584956e
Update allowed input data type
yvonnefroehlich Mar 19, 2024
4a7a143
Merge branch 'main' into fix-typos-63-grdcontour
yvonnefroehlich Mar 20, 2024
13360d4
Fix typo
yvonnefroehlich Mar 20, 2024
57837fb
Update docstring
yvonnefroehlich Mar 21, 2024
4f06fe4
Use sequence instead of sequence_comma
yvonnefroehlich Mar 21, 2024
311015e
Extend allow input formats
yvonnefroehlich Mar 21, 2024
560622d
Merge branch 'main' into fix-typos-63-grdcontour
yvonnefroehlich Mar 21, 2024
4ae5073
[format-command] fixes
actions-bot Mar 21, 2024
6925eca
Fix typo
yvonnefroehlich Mar 21, 2024
bbeb83c
Shorten documentation
yvonnefroehlich Mar 23, 2024
078553c
Shorten documentation
yvonnefroehlich Mar 23, 2024
1e114cf
Clearify documentation
yvonnefroehlich Mar 23, 2024
c67fcf8
Merge branch 'main' into fix-typos-63-grdcontour
yvonnefroehlich Mar 23, 2024
0cd2f0b
Update docs, Add code for list input
yvonnefroehlich Mar 25, 2024
ccd6b01
Merge branch 'main' into fix-typos-63-grdcontour
yvonnefroehlich Mar 25, 2024
581eef4
Process argument passt to "A" manually
yvonnefroehlich Mar 26, 2024
a86305c
Fix line length
yvonnefroehlich Mar 26, 2024
4c52daa
Merge branch 'main' into fix-typos-63-grdcontour
yvonnefroehlich Mar 26, 2024
c646b51
Merge branch 'main' into fix-typos-63-grdcontour
yvonnefroehlich Apr 5, 2024
6a6df2c
Merge branch 'main' into fix-typos-63-grdcontour
yvonnefroehlich Apr 11, 2024
7c3f012
Merge branch 'main' into fix-typos-63-grdcontour
yvonnefroehlich Apr 18, 2024
f2805bb
Merge branch 'main' into fix-typos-63-grdcontour
yvonnefroehlich Apr 22, 2024
d442adf
Merge branch 'main' into fix-typos-63-grdcontour
yvonnefroehlich Apr 24, 2024
11b2dac
Add tests
yvonnefroehlich Apr 24, 2024
4708483
Update pygmt/src/grdcontour.py
yvonnefroehlich Apr 25, 2024
56afbe8
Update pygmt/src/grdcontour.py
yvonnefroehlich Apr 25, 2024
c8772bf
Use for loop for A and C
yvonnefroehlich Apr 25, 2024
9a9ae49
Fix typo
yvonnefroehlich Apr 25, 2024
ad5c33e
Merge branch 'main' into fix-typos-63-grdcontour
yvonnefroehlich Apr 25, 2024
32c4f90
Update pygmt/tests/test_grdcontour.py
yvonnefroehlich Apr 25, 2024
d9c734b
Update pygmt/tests/test_grdcontour.py
yvonnefroehlich Apr 25, 2024
9f394f7
Explain code block for 'A' and 'C'
yvonnefroehlich Apr 25, 2024
557af15
Update tests
yvonnefroehlich Apr 25, 2024
e964dda
Add test_grdcontour_one_level.png into DVC
Apr 25, 2024
4501bab
Add test_grdcontour_multiple_levels.png into DVC
yvonnefroehlich Apr 25, 2024
5fa02fb
[format-command] fixes
actions-bot Apr 25, 2024
988d77e
Add period
yvonnefroehlich Apr 26, 2024
7ade301
Add periods
yvonnefroehlich Apr 26, 2024
cb6871b
Add code for backward-compatibility regarding 'sequence_plus'
yvonnefroehlich Apr 27, 2024
a4c9216
Merge branch 'main' into fix-typos-63-grdcontour
yvonnefroehlich Apr 27, 2024
e25e9ed
[format-command] fixes
actions-bot Apr 27, 2024
7fee937
Import warinings
yvonnefroehlich Apr 27, 2024
be21572
Use square instead of round brakets
yvonnefroehlich Apr 27, 2024
a05ec74
Add test for old syntax of 'annotations' parameter
yvonnefroehlich Apr 27, 2024
fedf60d
Fix keyword of 'warnings.warn' from 'catalog' to 'category'
yvonnefroehlich Apr 27, 2024
6c53454
Adjust test to reuse baseline image
yvonnefroehlich Apr 27, 2024
574c4a7
Fix typos
yvonnefroehlich Apr 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions pygmt/src/grdcontour.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@
p="perspective",
t="transparency",
)
@kwargs_to_strings(
R="sequence", L="sequence", A="sequence_plus", c="sequence_comma", p="sequence"
)
@kwargs_to_strings(R="sequence", L="sequence", c="sequence_comma", p="sequence")
def grdcontour(self, grid, **kwargs):
r"""
Convert grids or images to contours and plot them on maps.
Expand All @@ -53,16 +51,17 @@ def grdcontour(self, grid, **kwargs):
angle (col 3).
- A fixed contour interval *cont_int* or a single contour with
+\ *cont_int*.
annotation : str, int, or list
annotation : float or str
Specify or disable annotated contour levels, modifies annotated
contours specified in ``interval``.

- Specify a fixed annotation interval *annot_int* or a
single annotation level +\ *annot_int*.
- Disable all annotation with **-**.
- Optional label modifiers can be specified as a single string
``"[annot_int]+e"`` or with a list of arguments
``([annot_int], "e", "f10p", "gred")``.
single annotation level **+**\ *annot_int*.
- Disable all annotations by appending **n**.
- The appearance can be adjusted by appending different modifiers, e.g.,
``"annot_int+f10p+gred"`` gives annotations with a font size of 10
points and a red filled box. For all available modifiers see
:gmt-docs:`grdcontour.html#a`.
limit : str or list of 2 ints
*low*/*high*.
Do no draw contours below `low` or above `high`, specify as string
Expand Down