Skip to content

Conversation

@jorgepiloto
Copy link
Member

@jorgepiloto jorgepiloto commented Oct 23, 2024

This pull-request fixes #301 by ensuring plotly is supported in our theme. Matplotlib support is explored too.

Screenshot 2024-10-25 at 14-25-39 Sphinx-Gallery — Ansys Sphinx Theme

summary

We had to add our own hook because we support both nbsphinx and sphinx-gallery simultaneously. This was causing nbsphinx to execute notebooks generated by sphinx-gallery again, leading to errors.
But this is specifically for ansys-sphinx-theme

Additionally, regarding Plotly (which was the original focus of this PR), insights are:

  1. Plotly 6.0.0 Issue: We cannot use Plotly 6.0.0 as there is a breaking issue on their side.added the issue link in the pyproject.toml file next to the dependency.
  2. Missing Plotly.js: Plotly was not working in our case because plotly.js was missing. now added it, and it is working correctly in sphinx-gallery scripts.
Images

Sphinx gallery

Screenshot 2025-03-14 at 17 23 09

nbsphinx
Screenshot 2025-03-14 at 17 27 46

@jorgepiloto jorgepiloto requested a review from a team as a code owner October 23, 2024 13:37
@jorgepiloto jorgepiloto added this to the v1.2 milestone Oct 23, 2024
@github-actions github-actions bot added the enhancement General improvements to existing features label Oct 23, 2024
@jorgepiloto jorgepiloto changed the title feat: enable matplotlib adn plotly in examples feat: enable matplotlib and plotly in examples Oct 23, 2024
@github-actions github-actions bot added the maintenance Generic maintenance related label Oct 25, 2024
@jorgepiloto
Copy link
Member Author

Plotly and matplotlib are supported. Main issue here is that the different extensions are getting in conflict because "sphinx-gallery" generates a bunch of files. Still working on it.

@github-actions github-actions bot added the ui/ux Related with UI/UX design label Mar 14, 2025
@RobPasMue
Copy link
Member

What's the status with this PR? It's been going on since Oct 2024

@Revathyvenugopal162
Copy link
Contributor

What's the status with this PR? It's been going on since Oct 2024

We are working on this and trying to get this with theme v1.4

@Revathyvenugopal162
Copy link
Contributor

tested with ansys/pymapdl#2346

Copy link
Member Author

@jorgepiloto jorgepiloto left a comment

Choose a reason for hiding this comment

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

Almost there, just left some comments.

@Revathyvenugopal162
Copy link
Contributor

Almost there, just left some comments.

Incorporated all the comments, Thanks @jorgepiloto

@jorgepiloto jorgepiloto merged commit ecff469 into main Mar 19, 2025
23 checks passed
@jorgepiloto jorgepiloto deleted the feat/plotly branch March 19, 2025 09:51
@jorgepiloto
Copy link
Member Author

Thanks for taking the lead here, @Revathyvenugopal162. Merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement General improvements to existing features maintenance Generic maintenance related ui/ux Related with UI/UX design

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Request: Plotly support in gallery examples

6 participants