Skip to content
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

Improve the gallery example for datetime inputs #919

Merged
merged 10 commits into from
Feb 18, 2021

Conversation

michaelgrund
Copy link
Member

@michaelgrund michaelgrund commented Feb 17, 2021

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
Copy link
Member

seisman commented Feb 17, 2021

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
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
Copy link
Member

seisman commented Feb 18, 2021

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
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.

Copy link
Member

@seisman seisman left a comment

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?

examples/gallery/plot/datetime-inputs.py Outdated Show resolved Hide resolved
@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
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