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

seisman merged 10 commits into
masterfrom
correct-typo-gallery-datetime

Conversation

@michaelgrund

@michaelgrund michaelgrund commented Feb 17, 2021 •

Copy link
Copy Markdown
Member

Fixed typo.

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

seisman commented Feb 17, 2021

Copy link
Copy Markdown
Member

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

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

Copy link
Copy Markdown
Member Author

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

done!

@seisman
seisman marked this pull request as draft February 17, 2021 16:56
@michaelgrund michaelgrund changed the title Correct typo in datetime-inputs gallery example Replace argument by parameter in datetime-inputs.py Feb 17, 2021
@seisman

seisman commented Feb 18, 2021

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
Member Author

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.

@seisman seisman 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?

@seisman seisman changed the title Replace argument by parameter in datetime-inputs.py Improve the gallery example datetime-inputs.py Feb 18, 2021
@seisman seisman changed the title Improve the gallery example datetime-inputs.py Improve the gallery example for datetime inputs Feb 18, 2021
@seisman
seisman marked this pull request as ready for review February 18, 2021 20:36
@seisman seisman removed the skip-changelog Skip adding Pull Request to changelog label Feb 18, 2021
@seisman
seisman merged commit be38d78 into master Feb 18, 2021
@seisman
seisman deleted the correct-typo-gallery-datetime branch February 18, 2021 20:55
@seisman seisman 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

This branch was previously deployed

1 inactive deployment
Preview — 21fdf2a8 Deployed Feb 18, 2021 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation skip-changelog Skip adding Pull Request to changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants