Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Feature: Add histtype option for ridgeline histograms#557

Merged
cvanelteren merged 12 commits into
mainUltraplot/UltraPlot:mainfrom
feat/ridgeline-histtypeUltraplot/UltraPlot:feat/ridgeline-histtypeCopy head branch name to clipboard
Feb 12, 2026
Merged

Feature: Add histtype option for ridgeline histograms#557
cvanelteren merged 12 commits into
mainUltraplot/UltraPlot:mainfrom
feat/ridgeline-histtypeUltraplot/UltraPlot:feat/ridgeline-histtypeCopy head branch name to clipboard

Conversation

@cvanelteren

@cvanelteren cvanelteren commented Feb 6, 2026

Copy link
Copy Markdown
Collaborator

This PR introduces a Matplotlib-style histtype option for ridgeline(hist=True) to support bar, step, and stepfilled rendering in addition to the existing filled ridge. The change preserves current defaults, adds validation, and includes a basic test to ensure bar-style ridgelines render without error.

@cvanelteren

Copy link
Copy Markdown
Collaborator Author

Maybe this is a good tester to get the review going on @munechika-koyo

@cvanelteren cvanelteren changed the title Add histtype option for ridgeline histograms Feature: Add histtype option for ridgeline histograms Feb 7, 2026
@cvanelteren

Copy link
Copy Markdown
Collaborator Author

Thanks @beckermr, do you have any additional comments @munechika-koyo?

Comment thread ultraplot/axes/plot.py
if hist and histtype is None:
histtype = "fill"
if hist:
allowed = ("fill", "bar", "step", "stepfilled")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
allowed = ("fill", "bar", "step", "stepfilled")
allowed = {"fill", "bar", "step", "stepfilled"}

Comment thread ultraplot/axes/plot.py
zorder=fill_zorder,
)
# Draw outline on top (excluding baseline)
elif is_hist and histtype in ("step", "stepfilled"):

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
elif is_hist and histtype in ("step", "stepfilled"):
elif is_hist and histtype in {"step", "stepfilled"}:

@munechika-koyo

Copy link
Copy Markdown

I made a few comments that aren't particularly critical.
So it looks good to me.

@cvanelteren cvanelteren merged commit f082458 into main Feb 12, 2026
16 of 24 checks passed
@cvanelteren cvanelteren deleted the feat/ridgeline-histtype branch February 12, 2026 23:09
K-Mirembe-Mercy pushed a commit to K-Mirembe-Mercy/UltraPlot that referenced this pull request Mar 22, 2026
* Add histtype option for ridgeline histograms

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Refresh baseline cache key for hash-seed-stable compares

(cherry picked from commit 1ff58be)

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.