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

Expand Colorbar gallery example for categorical data #2395

Merged
merged 13 commits into from
Mar 11, 2023

Conversation

yvonnefroehlich
Copy link
Member

@yvonnefroehlich yvonnefroehlich commented Mar 5, 2023

Description of proposed changes

This PR aims to extend the Colorbar gallery example to show a colorbar suitable for categorical data.

Related to: #2357 (comment)

Currently the modified output figure looks like:
colorbar_gallery_equalsize

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

@yvonnefroehlich yvonnefroehlich added the enhancement Improving an existing feature label Mar 5, 2023
@yvonnefroehlich yvonnefroehlich added this to the 0.9.0 milestone Mar 5, 2023
@yvonnefroehlich yvonnefroehlich self-assigned this Mar 5, 2023
yvonnefroehlich and others added 3 commits March 9, 2023 16:20
Co-authored-by: Michael Grund <23025878+michaelgrund@users.noreply.github.com>
@yvonnefroehlich yvonnefroehlich changed the title WIP: Expand Colorbar gallery example for categorical data Expand Colorbar gallery example for categorical data Mar 9, 2023
examples/gallery/embellishments/colorbar.py Show resolved Hide resolved
Comment on lines 47 to 51
# Colorbar position justified outside map frame (J) at Middle Right (MR),
# Colorbar placed outside figure frame (J) at Middle Right (MR),
Copy link
Member

Choose a reason for hiding this comment

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

In my opinion "figure" is not correct here, since the whole object is the figure, including the area outside the map frame where the colorbar is placed.

Copy link
Member Author

Choose a reason for hiding this comment

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

I see your point. My intention to change it was that the generated figure is no geographical map. Maybe "plot" would serve as a more general term? But I am not sure whether there is a clear differentiation between "plot" and "figure". Thus, I changed it back to "map" in commit 29a7bb7.

@michaelgrund michaelgrund added the final review call This PR requires final review and approval from a second reviewer label Mar 9, 2023
@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label Mar 11, 2023
@seisman seisman merged commit 8540a9d into main Mar 11, 2023
@seisman seisman deleted the expand-gallery-colorbar branch March 11, 2023 04:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improving an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants