-
Notifications
You must be signed in to change notification settings - Fork 224
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
Figure.grdcontour: Deprecate parameter "interval" to "levels" (FutureWarning since v0.12.0, will be removed in v0.16.0) #3209
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,16 +33,12 @@ | |
# Contour line settings | ||
# --------------------- | ||
# | ||
# Use the ``annotation`` and ``interval`` parameters to adjust contour line | ||
# Use the ``annotation`` and ``levels`` parameters to adjust contour line | ||
# intervals. In the example below, there are contour intervals every 250 meters | ||
# and annotated contour lines every 1,000 meters. | ||
|
||
fig = pygmt.Figure() | ||
fig.grdcontour( | ||
annotation=1000, | ||
interval=250, | ||
grid=grid, | ||
) | ||
fig.grdcontour(annotation=1000, levels=250, grid=grid) | ||
fig.show() | ||
|
||
|
||
|
@@ -57,7 +53,7 @@ | |
fig = pygmt.Figure() | ||
fig.grdcontour( | ||
annotation=1000, | ||
interval=250, | ||
levels=250, | ||
grid=grid, | ||
limit=[-4000, -2000], | ||
) | ||
Comment on lines
54
to
59
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This code block and many others can be rewritten into a single line after we set the line length limit to 88 characters. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I should find the time to make both updates. Should these be included in this PR, or better in separate PR and have this PR for the deprecation? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK. Let's keep this PR small. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just submitted PR #3212 for working on this. |
||
|
@@ -74,7 +70,7 @@ | |
fig = pygmt.Figure() | ||
fig.grdcontour( | ||
annotation=1000, | ||
interval=250, | ||
levels=250, | ||
grid=grid, | ||
limit=[-4000, -2000], | ||
projection="M10c", | ||
|
@@ -104,7 +100,7 @@ | |
) | ||
fig.grdcontour( | ||
annotation=1000, | ||
interval=250, | ||
levels=250, | ||
grid=grid, | ||
limit=[-4000, -2000], | ||
) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please update this example to always put
grid
as the first parameter?