Skip to content

Improve the gallery example for datetime inputs - #919

Merged
seisman merged 10 commits into
masterfrom
correct-typo-gallery-datetime
Feb 18, 2021
Merged

Improve the gallery example for datetime inputs#919
seisman merged 10 commits into
masterfrom
correct-typo-gallery-datetime

Conversation

@michaelgrund

@michaelgrundmichaelgrund commented Feb 17, 2021

Copy link
Copy Markdown
Member

Fixed typo.

@michaelgrundmichaelgrund added the documentation Improvements or additions to documentation label Feb 17, 2021
@michaelgrundmichaelgrund added this to the 0.3.1 milestone Feb 17, 2021
@seisman

Copy link
Copy Markdown
Member

Could you please also change "arguments" to "parameters", following #886?

@seismanseisman added the skip-changelog Skip adding Pull Request to changelog label Feb 17, 2021
@michaelgrund

Copy link
Copy Markdown
MemberAuthor

Could you please also change "arguments" to "parameters", following #886?

done!

@seisman
seisman marked this pull request as draft February 17, 2021 16:56
@michaelgrundmichaelgrund changed the title Correct typo in datetime-inputs gallery exampleReplace argument by parameter in datetime-inputs.pyFeb 17, 2021
@seisman

Copy link
Copy Markdown
Member

The example says:

The region parameter has to include the 𝑥 and 𝑦 axis limits as str in the form date_min/date_max/ymin/ymax.

Since #562, we can directly pass datetime to region. For example:

import pygmt
import datetime
fig = pygmt.Figure()
fig.basemap(
projection="X15c/5c", region=[datetime.date(2010, 1, 1), datetime.date(2030, 6, 1), 0, 10], frame=["WSen", "af"]
)
fig.show()

Please improve the example.

@michaelgrund

Copy link
Copy Markdown
MemberAuthor

The example says:

The region parameter has to include the 𝑥 and 𝑦 axis limits as str in the form date_min/date_max/ymin/ymax.

Since #562, we can directly pass datetime to region. For example:

import pygmt
import datetime
fig = pygmt.Figure()
fig.basemap(
projection="X15c/5c", region=[datetime.date(2010, 1, 1), datetime.date(2030, 6, 1), 0, 10], frame=["WSen", "af"]
)
fig.show()

Please improve the example.

Modified the description.

@seismanseisman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also please wrap the long lines to 80 chars?

Comment threadexamples/gallery/plot/datetime-inputs.py Outdated
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Comment threadexamples/gallery/plot/datetime-inputs.py Outdated
@seismanseisman changed the title Replace argument by parameter in datetime-inputs.pyImprove the gallery example datetime-inputs.pyFeb 18, 2021
@seismanseisman changed the title Improve the gallery example datetime-inputs.pyImprove the gallery example for datetime inputsFeb 18, 2021
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
@seisman
seisman marked this pull request as ready for review February 18, 2021 20:36
@seismanseisman removed the skip-changelog Skip adding Pull Request to changelog label Feb 18, 2021
@seisman
seisman merged commit be38d78 into masterFeb 18, 2021
@seisman
seisman deleted the correct-typo-gallery-datetime branch February 18, 2021 20:55
@seismanseisman added the skip-changelog Skip adding Pull Request to changelog label Mar 13, 2021
sixy6e pushed a commit to sixy6e/pygmt that referenced this pull request Dec 21, 2022
)
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentationskip-changelogSkip adding Pull Request to changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@michaelgrund@seisman