Skip to content

Improve the Cartesian histogram tutorial - #4965

Merged
seisman merged 1 commit into
GenericMappingTools:mainfrom
manduinca:docs/4905-histogram-tutorial
Nov 16, 2026
Merged

seisman merged 1 commit into
GenericMappingTools:mainfrom
manduinca:docs/4905-histogram-tutorial

Conversation

@manduinca

@manduinca manduinca commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Description of proposed changes

I start the tutorial with bin selection through series, covering a scalar width, minimum/maximum/increment, and explicit boundaries. I replace the separate stair-step section with a comparison of fill, pen, and stairs using the same data and axes. I also add normal distribution curves with distribution and distribution_pen, move vertical/horizontal bars to the end, and update the thumbnail.

Fixes #4905

Validation

I ran all nine figures with GMT 6.7.0 and Ghostscript 10.08.0 and inspected the output. A fresh Sphinx-Gallery build executed the tutorial (one example, nine images); Ruff and formatting checks pass.

The documentation build completed with 23 warnings outside the modified tutorial.

Preview

The comparison below is generated from the updated tutorial. The PR documentation preview can be linked here after CI builds it.

The same histogram shown with four combinations of fill, pen, and stairs

Bin widths and explicit boundaries

Mean and median distribution curves

https://pygmt-dev--4965.org.readthedocs.build/en/4965/tutorials/advanced/cartesian_histograms.html

I explain bin selection, compare styles on shared axes, and add
normal distribution curves. I move the orientation comparison to
the end so the tutorial starts with the more common workflow.

Fixes GenericMappingTools#4905
@seisman

seisman commented Oct 28, 2026

Copy link
Copy Markdown
Member

@yvonnefroehlich Are you willing to review this PR since you wrote the first version?

@seisman seisman added this to the 0.20.0 milestone Oct 28, 2026
@seisman seisman added documentation Improvements or additions to documentation needs review This PR has higher priority and needs review. labels Oct 28, 2026
@seisman
seisman merged commit 96a15a7 into GenericMappingTools:main Nov 16, 2026
9 of 10 checks passed
@seisman seisman removed the needs review This PR has higher priority and needs review. label Nov 16, 2026
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.

Improve the tutorial for Cartesian Histograms

2 participants