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 a gallery example showing how to use advanced grdgradient via the "azimuth" & "normalize" parameters #2354

Merged
merged 60 commits into from Mar 15, 2023

Conversation

jhtong33
Copy link
Contributor

@jhtong33 jhtong33 commented Feb 8, 2023

Description of proposed changes
This PR aims to add a gallery example showing how to use advanced grdgradient via the azimuth & normalize parameters

Because the gallery/images/grdgradient.py already showed how to use radiance parameter, I choose azimuth as the example.

Preview at https://pygmt-dev--2354.org.readthedocs.build/en/2354/gallery/images/grdgradient_shading.html

grdgradient azimuth and normalize gallery example

Fixes #2322

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.
  • Use underscores (not hyphens) in names of Python files and directories.

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

jhtong33 and others added 30 commits January 11, 2023 12:44
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com>
Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com>
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com>
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com>
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
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.

Thanks @JingHuiTong! Just a few more comments/suggestions. It'll be good to include this in the upcoming PyGMT v0.9.0 release by the end of March, so we'll make sure to get this merged before then!

examples/gallery/images/grdgradient_shading.py Outdated Show resolved Hide resolved
examples/gallery/images/grdgradient_shading.py Outdated Show resolved Hide resolved
examples/gallery/images/grdgradient_shading.py Outdated Show resolved Hide resolved
examples/gallery/images/grdgradient_shading.py Outdated Show resolved Hide resolved
jhtong33 and others added 2 commits March 14, 2023 11:33
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
examples/gallery/images/grdgradient_shading.py Outdated Show resolved Hide resolved
examples/gallery/images/grdgradient_shading.py Outdated Show resolved Hide resolved
examples/gallery/images/grdgradient_shading.py Outdated Show resolved Hide resolved
examples/gallery/images/grdgradient_shading.py Outdated Show resolved Hide resolved
Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com>
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
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.

Still need to fix the Style Checks (run \format), but this looks ready for final review!

@weiji14 weiji14 added final review call This PR requires final review and approval from a second reviewer and removed needs review This PR has higher priority and needs review. labels Mar 14, 2023
@maxrjones maxrjones mentioned this pull request Mar 14, 2023
36 tasks
JingHuiTong and others added 2 commits March 15, 2023 09:23
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com>
@jhtong33
Copy link
Contributor Author

/format

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.

Looks great. Thanks for the nice gallery example @JingHuiTong.

Copy link
Member

@yvonnefroehlich yvonnefroehlich 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 to me!
Thanks @JingHuiTong for putting efforts into contributing this gallery example 🙂 and also for considering the review comments!

@seisman seisman merged commit 139c97e into GenericMappingTools:main Mar 15, 2023
5 checks passed
@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label Mar 15, 2023
@seisman
Copy link
Member

seisman commented Mar 15, 2023

@JingHuiTong As mentioned in #2321 (comment), if you like, you can open a new pull request to add yourself to the AUTHORS.md file.

@jhtong33
Copy link
Contributor Author

@JingHuiTong As mentioned in #2321 (comment), if you like, you can open a new pull request to add yourself to the AUTHORS.md file.

WOW! Undoubtedly YES! I have already open new PR #2430

@jhtong33 jhtong33 deleted the grdgradient branch July 18, 2023 12:13
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.

Example showing grdgradient shading outputs with different radiance or normalize values
6 participants