Skip to content

A gallery example for the contour method - #1387

Merged
maxrjones merged 18 commits into
GenericMappingTools:masterfrom
yohaimagen:contour-gallery-example
Jul 20, 2021
Merged

maxrjones merged 18 commits into
GenericMappingTools:masterfrom
yohaimagen:contour-gallery-example

Conversation

@yohaimagen

@yohaimagen yohaimagen commented Jul 17, 2021 •

Copy link
Copy Markdown
Contributor

Description of proposed changes

In response to issue #1340 adding a gallery example for the contour method.

Fixes #1340

Preview at https://pygmt-git-fork-yohaimagen-contour-gallery-example-gmt.vercel.app/gallery/images/contours.html

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

@welcome

welcome Bot commented Jul 17, 2021

Copy link
Copy Markdown

💖 Thanks for opening this pull request! 💖

Please make sure you read our contributing guidelines and abide by our code of conduct.

A few things to keep in mind:

  • If you need help writing tests, take a look at the existing ones for inspiration. If you don't know where to start, let us know and we'll walk you through it.
  • All new features should be documented. It helps to write the docstrings for your functions/classes before writing the code. This will help you think about your code design and results in better code.
  • No matter what, we are really grateful that you put in the effort to do this! 🎉

@weiji14 weiji14 added documentation Improvements or additions to documentation scipy-sprint Things to work on during the SciPy sprint! labels Jul 17, 2021
@yohaimagen
yohaimagen marked this pull request as ready for review July 17, 2021 12:05
@weiji14 weiji14 changed the title A gallery example for the contour method. A gallery example for the contour method Jul 17, 2021
@maxrjones

Copy link
Copy Markdown
Member

/format

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

Great work @yohaimagen; thanks for addressing this issue! I have made a few suggestions on this pull request. If you agree with the suggestions, you can commit the changes using these steps:

  1. Click on the 'Files changed' tab in the pull request
    image
  2. For each comment, you can click 'commit suggestion' in order to commit the suggestions one at a time or click 'add suggestion to batch', which allows you to commit multiple suggestions at once. If you plan to accept multiple suggestions, I recommend using the 'add suggestion to batch' option.
    image
    2a. If you clicked 'commit suggestion', you'll see a pop-up where you can enter a descriptive commit message and then click 'commit changes'.
    2b. If you clicked 'add suggestion to batch', after reviewing all the suggestions, you can click 'commit suggestions' near the top of the 'files changed' tab. This will similarly prefill a commit message and allow you to commit the changes.

Feel free to reach out if you have any questions!

Comment thread examples/gallery/lines/contours.py Resolved
Comment thread examples/gallery/lines/contours.py Resolved
Comment thread examples/gallery/lines/contours.py Resolved
Comment thread examples/gallery/lines/contours.py Resolved
Comment thread examples/gallery/lines/contours.py Resolved
@yohaimagen

yohaimagen commented Jul 18, 2021 •

Copy link
Copy Markdown
Contributor Author

Sorry, I didn't saw your suggestions before adding some of my own, I incorporate some of your suggestions into mine.

@maxrjones

Copy link
Copy Markdown
Member

/format

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

No worries, your revisions are great! I have made a set of small comments, mostly related to sphinx formatting, which can be really particular. I also recommended to increase the contour spacing from 5 to 10 in order to make it easier to see the difference between the contour spacing and the annotation spacing.

Comment thread examples/gallery/lines/contours.py Resolved
Comment thread examples/gallery/lines/contours.py Resolved
Comment thread examples/gallery/lines/contours.py Resolved
Comment thread examples/gallery/lines/contours.py Resolved
Comment thread examples/gallery/lines/contours.py Resolved
Comment thread examples/gallery/lines/contours.py Resolved
Comment thread examples/gallery/lines/contours.py Resolved
Comment thread examples/gallery/lines/contours.py Resolved
Comment thread examples/gallery/lines/contours.py Resolved
@yohaimagen

Copy link
Copy Markdown
Contributor Author

Great, I committed all of your suggestions @meghanrjones. I think that this gallery example is done :)

@yohaimagen

Copy link
Copy Markdown
Contributor Author

One last thing, maybe it will be better to put this example under "Images, contours, and fields" than under "Lines and vectors".

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

Great work!

We usually leave approved pull requests open for ~1 day or until we get a second approval before merging, just in case other maintainers see anything major that needs adjusting.

Comment thread examples/gallery/images/contours.py Resolved
@maxrjones maxrjones added the final review call This PR requires final review and approval from a second reviewer label Jul 20, 2021
@maxrjones
maxrjones merged commit 9b60f5c into GenericMappingTools:master Jul 20, 2021
@welcome

welcome Bot commented Jul 20, 2021

Copy link
Copy Markdown

🎉🎉🎉 Congrats on merging your first pull request and welcome to the team! 🎉🎉🎉

Please open a new pull request to add yourself to the AUTHORS.md file. We hope that this was a good experience for you. Let us know if there is any way that the contributing process could be improved.

@maxrjones maxrjones removed the final review call This PR requires final review and approval from a second reviewer label Jul 20, 2021
@maxrjones

Copy link
Copy Markdown
Member

Great work @yohaimagen, congratulations on merging the PR! 🎉 We hope to see you around more 😄

@weiji14

weiji14 commented Jul 20, 2021

Copy link
Copy Markdown
Member

sixy6e pushed a commit to sixy6e/pygmt that referenced this pull request Dec 21, 2022
* Initial commit for contour gallery example

* Explain the acceptable data formats, levels, and annotation parameters.

* Add a bit more explanation on the implementation, adding a reference to numpy ndarray,  adding units to pen.

Co-authored-by: Meghan Jones <[email protected]>
Co-authored-by: Will Schlitzer <[email protected]>

This branch was previously deployed

1 inactive deployment
Preview — 6529a9d8 Deployed Jul 20, 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 scipy-sprint Things to work on during the SciPy sprint!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add gallery/tutorial for Figure.contour()

5 participants