Skip to content

Conversation

yohaimagen
Copy link
Contributor

@yohaimagen yohaimagen commented Jul 17, 2021

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

welcome bot commented Jul 17, 2021

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

/format

Copy link
Member

@maxrjones maxrjones left a comment

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!

@yohaimagen
Copy link
Contributor Author

yohaimagen commented Jul 18, 2021

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

@maxrjones
Copy link
Member

/format

Copy link
Member

@maxrjones maxrjones left a comment

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.

@yohaimagen
Copy link
Contributor Author

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

@yohaimagen
Copy link
Contributor Author

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

Copy link
Member

@maxrjones maxrjones left a comment

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.

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

welcome bot commented Jul 20, 2021

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

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

@weiji14
Copy link
Member

weiji14 commented Jul 20, 2021

Cheers @yohaimagen! Your gallery example is now live at https://www.pygmt.org/dev/gallery/index.html#images-contours-and-fields. Well done! 🥳

image

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