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 tutorial for cartesian histograms #2445

Merged
merged 79 commits into from
May 5, 2023
Merged

Add tutorial for cartesian histograms #2445

merged 79 commits into from
May 5, 2023

Conversation

yvonnefroehlich
Copy link
Member

@yvonnefroehlich yvonnefroehlich commented Mar 20, 2023

Description of proposed changes

This PR aims to add a tutorial showing how to create cartesian histograms:

  • using vertical and horizontal bars
  • showing counts and frequency percent
  • adding annotations to the bars
  • showing cumulative values
  • using color and pattern as fill for the bars
  • using overlaid, stacked, and grouped bars

Releated to #2421 (comment)

Preview: https://pygmt-dev--2445.org.readthedocs.build/en/2445/tutorials/advanced/cartesian_histograms.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 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 documentation Improvements or additions to documentation label Mar 20, 2023
@yvonnefroehlich yvonnefroehlich self-assigned this Mar 20, 2023
@yvonnefroehlich
Copy link
Member Author

/format

@yvonnefroehlich yvonnefroehlich marked this pull request as draft March 20, 2023 20:56
@yvonnefroehlich yvonnefroehlich marked this pull request as draft March 20, 2023 20:56
@weiji14
Copy link
Member

weiji14 commented Mar 23, 2023

Quick question: What's a Cartesian histogram? Specifically, when is a histogram considered Cartesian or not?

@yvonnefroehlich
Copy link
Member Author

Quick question: What's a Cartesian histogram? Specifically, when is a histogram considered Cartesian or not?

Beside Cartesian histograms created with pygmt.Figure.histogram, there are polar histograms or rose diagrams which can be created with pygmt.Figure.rose (gallery example at https://www.pygmt.org/latest/gallery/histograms/rose.html). In this tutorial I only want to address Cartesian histograms. I agree, that a similar tutorial for polar histograms can make sense, but this is nothing I can do for the v0.9.0 release.

@yvonnefroehlich yvonnefroehlich mentioned this pull request Mar 28, 2023
36 tasks
@seisman

This comment was marked as outdated.

yvonnefroehlich and others added 3 commits April 29, 2023 09:00
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
@yvonnefroehlich yvonnefroehlich changed the title WIP: Add tutorial for cartesian histograms Add tutorial for cartesian histograms Apr 29, 2023
@yvonnefroehlich yvonnefroehlich marked this pull request as ready for review April 29, 2023 12:13
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 to me.

@seisman seisman 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 May 2, 2023
@seisman
Copy link
Member

seisman commented May 3, 2023

Ping @GenericMappingTools/pygmt-maintainers to give this PR a final review.

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.

This is great!

@seisman seisman merged commit 7b8fcc0 into main May 5, 2023
@seisman seisman deleted the add-tutorial-histogram branch May 5, 2023 04:51
@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label May 5, 2023
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.

None yet

6 participants