Skip to content

Plot gallery - #18

Open
sr-murthy wants to merge 55 commits into
mainfrom
plot-gallery
Open

Plot gallery#18
sr-murthy wants to merge 55 commits into
mainfrom
plot-gallery

Conversation

@sr-murthy

@sr-murthy sr-murthy commented Jun 19, 2026

Copy link
Copy Markdown
Member
  • Add kaleido to package deps + orca to docs deps
  • Add a plot gallery in the Sphinx docs - currently covers bar charts, bar line charts, descriptive tables, dual stack pyramid plots, frequency charts, Sankey diagrams, sunburst plots, upset plots (more will be added over time).

Visualisation page (RTD build version)

@sr-murthy sr-murthy self-assigned this Jun 19, 2026
@sr-murthy sr-murthy linked an issue Jun 19, 2026 that may be closed by this pull request
@sr-murthy
sr-murthy marked this pull request as draft June 19, 2026 14:32
@sr-murthy sr-murthy changed the title Plot gallery WIP: Plot gallery Jun 19, 2026
@codecov

codecov Bot commented Jun 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
isaricanalytics/analytics.py 11.33% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sr-murthy
sr-murthy force-pushed the plot-gallery branch 2 times, most recently from a82ad18 to 3518734 Compare June 19, 2026 14:42
@sr-murthy sr-murthy added documentation Improvements or additions to documentation enhancement New feature or request labels Jul 1, 2026
@sr-murthy sr-murthy linked an issue Jul 1, 2026 that may be closed by this pull request
@sr-murthy
sr-murthy force-pushed the plot-gallery branch 6 times, most recently from 945432d to 83e85db Compare July 2, 2026 15:13
@sr-murthy sr-murthy added the packaging Packaging including management of project metadata and dependencies in the TOML. label Jul 2, 2026
@sr-murthy
sr-murthy force-pushed the plot-gallery branch 12 times, most recently from 4915521 to a09f389 Compare July 24, 2026 10:10
alasdairwilson
alasdairwilson previously approved these changes Aug 19, 2026

@alasdairwilson alasdairwilson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is fantastic! I had fun messing with the sankey plot in the rendered docs.

There were some minor typos (there might be more I didn't see) and I would reccomend storing the data used, especially the big csv tables as sample data or test data rather than.

The only other thing I'd add is make absolute sure this is squashed on merge since there are some very large files that were subsequently removed, so would be a shame to not prevent them from being added to the git repo forever.

Comment thread docs/sources/plot-gallery/examples/dual_stack_pyramid.py
Comment thread docs/sources/plot-gallery/examples/sunburst.py Outdated
Comment thread docs/sources/plot-gallery/examples/upset.py Outdated
Comment thread docs/sources/plot-gallery/examples/upset.py Outdated
Comment thread docs/sources/plot-gallery/examples/upset.py Outdated
Comment thread docs/sources/plot-gallery/examples/upset.py Outdated
Comment thread pyproject.toml
@sr-murthy

Copy link
Copy Markdown
Member Author

Fine, the next PR update - probably early next week - will address these.

P. S. We can certainly store the figure CSVs as static files, perhaps in test data, and load them in the figure scripts, but to keep it simple we can keep the hard-coded RST tables that appear as comments (required by Sphinx gallery). If you want to make the RST comments dynamic you'd have to dynamically write the figure script files (examples/*.py), and that would involve more work that is probably worth at this point.

There is a PR setting for squash on merge, and the large files to which you refer were added then removed in earlier commits. So, squashing will not result in these files being added back.

@alasdairwilson

Copy link
Copy Markdown
Member

There is a PR setting for squash on merge, and the large files to which you refer were added then removed in earlier commits. So, squashing will not result in these files being added back.

You misunderstand, I wasn't asking them to be removed from the current state of main, I wanted to keep them out of the history, as if this was not squashed they would forever live in reachable history of the repo as blobs.

But yes squash on merge will prevent that, and this is what I was asking to be done.

@sr-murthy

sr-murthy commented Aug 20, 2026

Copy link
Copy Markdown
Member Author

You misunderstand, I wasn't asking them to be removed from the current state of main

I do understand - I removed the files myself here - but squash on merge is already enabled (screenshot below from the PR ruleset):

Screenshot 2026-08-20 at 09 43 53

This is one of the reasons why we're enforcing squash merging (with rebase) in all the key repos - you get a much smaller, more linear, cleaner Git history, which makes Git log easier to read for a start.

Co-authored-by: Alasdair Wilson <60351846+alasdairwilson@users.noreply.github.com>
Signed-off-by: sr-murthy <sandeep.murthy@ndm.ox.ac.uk>
sr-murthy and others added 3 commits August 20, 2026 10:51
Co-authored-by: Alasdair Wilson <60351846+alasdairwilson@users.noreply.github.com>
Signed-off-by: sr-murthy <sandeep.murthy@ndm.ox.ac.uk>
Co-authored-by: Alasdair Wilson <60351846+alasdairwilson@users.noreply.github.com>
Signed-off-by: sr-murthy <sandeep.murthy@ndm.ox.ac.uk>
@sr-murthy
sr-murthy marked this pull request as draft August 20, 2026 12:17
@sr-murthy sr-murthy changed the title Plot gallery WIP: Plot gallery Aug 20, 2026
@sr-murthy

Copy link
Copy Markdown
Member Author

@alasdairwilson As you may have noted, the refactored plot gallery that now depends on Sphinx gallery only works because I'm using this Plotly fork to deal with a Sphinx gallery <-> Plotly problem I reported here. The solution is being reviewed in this Plotly PR.

We shouldn't obviously merge this PR at least until that Plotly PR is merged, and a new Plotly release, which we will need to pin. This will almost certainly also trigger a Sphinx gallery release, so we should wait for that too.

@sr-murthy
sr-murthy marked this pull request as ready for review August 21, 2026 09:57
Comment thread docs/sources/plot-gallery/examples/bar.py Fixed
Comment thread docs/sources/plot-gallery/examples/bar_line.py Fixed
Comment thread docs/sources/plot-gallery/examples/dual_stack_pyramid.py Fixed
Comment thread docs/sources/plot-gallery/examples/frequency.py Fixed
Comment thread docs/sources/plot-gallery/examples/sankey.py Fixed
Comment thread docs/sources/plot-gallery/examples/sunburst.py Fixed
Comment thread docs/sources/plot-gallery/examples/table.py Fixed
Comment thread docs/sources/plot-gallery/examples/upset.py Fixed
Comment thread docs/sources/plot-gallery/examples/bar.py Dismissed
Comment thread docs/sources/plot-gallery/examples/bar_line.py Dismissed
@sr-murthy

Copy link
Copy Markdown
Member Author

@alasdairwilson Please review again. Fixes made + two more example scripts added for bar charts, and bar-line charts. Also, all static CSV data defined in the scripts have been moved to CSVs in a new subfolder (examples/csv) organised by figure.

It is certainly possible to also have dynamic generation of the RST tables of the synthetic datasets appearing in the plot pages - I think that seemed to be one of your suggestions / comments in the last review - but that would require additional changes that could be done at a later point.

Comment thread docs/sources/plot-gallery/examples/dual_stack_pyramid.py Dismissed
Comment thread docs/sources/plot-gallery/examples/frequency.py Dismissed
Comment thread docs/sources/plot-gallery/examples/sankey.py Dismissed
Comment thread docs/sources/plot-gallery/examples/sunburst.py Dismissed
Comment thread docs/sources/plot-gallery/examples/table.py Dismissed
Comment thread docs/sources/plot-gallery/examples/upset.py Dismissed
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 packaging Packaging including management of project metadata and dependencies in the TOML.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dependencies do not support export of plots/figures docs: plot gallery

2 participants