-
Notifications
You must be signed in to change notification settings - Fork 229
Add colorbars to plots of gallery and tutorial examples #2190
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
Conversation
I extended issue #2030 and added also to Plotting a surface a colorbar. Furthermore, I added a grid. Of course, we can discuss these changes! Strictly speaking, two colorbars have to be added to Sampling along tracks, as there are color-codings for both the bathymetry ("gray") and the sampled bathymetry points ("terra"). Should I add both colorbars or only the one for the sampled bathymetry points? |
Adding the grid looks good to me.
Yes, two colorbars makes more sense. It's also a good example to show how to add two colorbars on the same map. |
@yvonnefroehlich Thanks for your active contributions to the PyGMT project. On behalf of the PyGMT maintainers @GenericMappingTools/pygmt-maintainers, I’d like to invite you to join the “PyGMT Devs” Slack channel, which is used usually for some internal discussions. Please leave your email address here or send your email address to me (seisman.info#gmail.com) if you’d like to join. |
Thanks @GenericMappingTools/gmt-maintainers for this positive feedback 🙂! I am sorry for accidentally closing this PR. |
Hm. Maybe it would be fair to ask @weiji14 whether he is fine with the changes of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm. Maybe it would be fair to ask @weiji14 whether he is fine with the changes of
track_sampling.py
as he is the original author of this example? But not sure if he is currently available slightly_smiling_face. Edit: I think three approving reviewers should be enough for merging.
Sorry for the late response. The original intention of the track_sampling.py
gallery example added in #308 was to showcase the grdtrack
data processing function, rather than as a proper 'map' per se.
Personally, I feel that having just one colorbar (the normalized elevation one) would be enough, since the background grayscale earth_relief elevation is just for context. But I also find normalized elevation to be hard to interpret (see my comment below), so not sure what's a good plan forward 😅 What are your thoughts?
Perhaps we can rewrite the grdtrack example to something like (https://docs.gmt-china.org/latest/examples/ex026/): |
Yes, how about we revert the changes to track_sampling and redesign the example in a separate PR? I think the other changes that add a colorbar are good to go. |
That's fine with me. |
Sounds good. |
I reverted the changes of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @yvonnefroehlich, and sorry for the back and forth 🙂
Description of proposed changes
This PR aims to add colorbars to some plots of the gallery and tutorial examples:
Sampling along tracks (track_sampling.py)Fixes #2030
Reminders
make format
andmake check
to make sure the code follows the style guide.doc/api/index.rst
.Slash Commands
You can write slash commands (
/command
) in the first line of a comment to performspecific operations. Supported slash commands are:
/format
: automatically format and lint the code/test-gmt-dev
: run full tests on the latest GMT development version