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

[Doc]: Histogram path example renders poorly in HTML #26990

Closed
ksunden opened this issue Oct 3, 2023 · 5 comments · Fixed by #27074
Closed

[Doc]: Histogram path example renders poorly in HTML #26990

ksunden opened this issue Oct 3, 2023 · 5 comments · Fixed by #27074
Labels
Documentation: examples files in galleries/examples Documentation
Milestone

Comments

@ksunden
Copy link
Member

ksunden commented Oct 3, 2023

Documentation Link

https://matplotlib.org/stable/gallery/misc/histogram_path.html#sphx-glr-gallery-misc-histogram-path-py

Problem

This plot renders poorly in the gallery web page as it is a single figure that is modified over two cells, but is displayed only after the first cell

All modifications from the second cell are not shown and an empty plot is displayed for the second subplot.

Suggested improvement

The two subplots could be made into different figures so each one gets rendered under their own cell.

Or if there is a way to tell sphinx-gallery to show the same figure twice (not sure if this exists).

Or the code blocks could be combined into one so there is only one figure rendered.

@story645
Copy link
Member

story645 commented Oct 3, 2023

The two subplots could be made into different figures so each one gets rendered under their own cell.

They seem fairly independent in the sample code. What about reworking this a bit so that the code common to both figures is up top and then each figure+code cell is just what's relevant for that figure?

@ksunden ksunden changed the title [Doc]: Histagram path example renders poorly in HTML [Doc]: Histogram path example renders poorly in HTML Oct 3, 2023
@niviPy
Copy link
Contributor

niviPy commented Oct 10, 2023

I would like to work on this.

@story645 story645 added the Documentation: examples files in galleries/examples label Oct 10, 2023
@story645
Copy link
Member

go for it, we don't assign issues but take a look at our contribution guide: https://matplotlib.org/devdocs/devel/index.html

@niviPy
Copy link
Contributor

niviPy commented Oct 12, 2023

Created a PR. @story645

@niviPy
Copy link
Contributor

niviPy commented Oct 14, 2023

@story645, I have updated PR with a commit for review suggestions. Any update?

timhoffm added a commit that referenced this issue Oct 14, 2023
Issue #26990: Split the histogram image into two for each code block.
@QuLogic QuLogic added this to the v3.9.0 milestone Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation: examples files in galleries/examples Documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants