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

Add intro tutorial section for creating contour map #2126

Merged
merged 23 commits into from
Oct 31, 2022
Merged

Conversation

willschlitzer
Copy link
Contributor

@willschlitzer willschlitzer commented Sep 20, 2022

This adds a second section to the Intro to PyGMT tutorial. It covers retrieving and plotting Earth relief data, adding a color palette and color bar, and plotting contour lines.

Preview at https://pygmt-dev--2126.org.readthedocs.build/en/2126/get-started/contour-map.html

Addresses #770

Reminders

  • Run make format and make check to make sure the code follows the style guide.
  • Add tests for new features or tests that would have caught the bug that you're fixing.
  • Add new public functions/methods/classes to doc/api/index.rst.
  • Write detailed docstrings for all functions/methods.
  • If wrapping a new module, open a 'Wrap new GMT module' issue and submit reasonably-sized PRs.
  • If adding new functionality, add an example to docstrings or tutorials.

Slash Commands

You can write slash commands (/command) in the first line of a comment to perform
specific operations. Supported slash commands are:

  • /format: automatically format and lint the code
  • /test-gmt-dev: run full tests on the latest GMT development version

@willschlitzer willschlitzer added the documentation Improvements or additions to documentation label Sep 20, 2022
@willschlitzer willschlitzer added this to the 0.8.0 milestone Sep 20, 2022
@willschlitzer willschlitzer self-assigned this Sep 20, 2022
@willschlitzer willschlitzer changed the title WIP: Add intro tutorial section for plotting Earth relief data Add intro tutorial section for plotting Earth relief data Sep 23, 2022
@willschlitzer willschlitzer marked this pull request as ready for review September 23, 2022 11:36
examples/get-started/contour-map.py Outdated Show resolved Hide resolved
examples/get-started/contour-map.py Outdated Show resolved Hide resolved
examples/get-started/contour-map.py Outdated Show resolved Hide resolved
examples/get-started/contour-map.py Outdated Show resolved Hide resolved
Comment on lines 116 to 118
# 1. Change the resolution of the grid file to either "01m" (lower resolution)
# or "15s" (higher resolution). Note that higher resolution grids will have
# larger file sizes.
Copy link
Member

Choose a reason for hiding this comment

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

Maybe link to https://www.generic-mapping-tools.org/remote-datasets/earth-relief.html#usage so users know what are the possible spatial resolutions, and mention explicitly that 01m stands for 1 arc minute (some people might think it's 1 meter).

examples/get-started/contour-map.py Outdated Show resolved Hide resolved
@weiji14 weiji14 added the final review call This PR requires final review and approval from a second reviewer label Oct 20, 2022
@seisman
Copy link
Member

seisman commented Oct 28, 2022

Ping @willschlitzer to finalize this PR so that we can merge it.

@seisman seisman requested a review from weiji14 October 31, 2022 01:36
@weiji14 weiji14 changed the title Add intro tutorial section for plotting Earth relief data Add intro tutorial section for creating contour map Oct 31, 2022
Copy link
Member

@weiji14 weiji14 left a comment

Choose a reason for hiding this comment

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

Looks good, thanks @willschlitzer! Just need to comment that pull_request: line in .github/workflows/cache_data.yaml as mentioned in https://github.com/GenericMappingTools/pygmt/pull/2126/files#r1008968590 before merging.

@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label Oct 31, 2022
@seisman seisman merged commit 952e754 into main Oct 31, 2022
@seisman seisman deleted the tutorial/contour-map branch October 31, 2022 07:20
sixy6e pushed a commit to sixy6e/pygmt that referenced this pull request Dec 21, 2022
…ols#2126)

Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants