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

gh-398: consistent plotting for notebooks #425

Merged
merged 10 commits into from
Nov 28, 2024
Merged

gh-398: consistent plotting for notebooks #425

merged 10 commits into from
Nov 28, 2024

Conversation

paddyroddy
Copy link
Member

@paddyroddy paddyroddy commented Nov 15, 2024

Closes #398. Adds a .matplotlibrc to stabilise the production of plots. For more detail on the config file, look at https://matplotlib.org/stable/users/explain/customizing.html#the-matplotlibrc-file. I haven't used a stylesheet (plt.style.use), as (except for classic) they don't define the resolution etc. https://github.com/matplotlib/matplotlib/tree/main/lib/matplotlib/mpl-data/stylelib.

I did run the notebooks, but they must be using these current values.

@paddyroddy paddyroddy added documentation Improvements or additions to documentation enhancement New feature or request science Science improvement or question labels Nov 15, 2024
@paddyroddy paddyroddy self-assigned this Nov 15, 2024
@paddyroddy paddyroddy requested review from ntessore and removed request for ntessore November 21, 2024 11:44
@paddyroddy
Copy link
Member Author

@ntessore I've added matplotlibrc symlink to both folders instead

@ntessore
Copy link
Collaborator

Thanks @paddyroddy, I think this is a nice and clean solution!

I did run the notebooks, but they must be using these current values.

This surprised me, so I had a look. I guess you used our noxfile ... where we forgot to add the --inplace flag to the jupyter execute so that the execution actually changes the notebooks! At the moment, the notebooks run, but their outputs aren't stored anywhere (and our examples' HTML artefacts therefore never change). That's on me, I should have picked up on it in #367.

@paddyroddy
Copy link
Member Author

Thanks @paddyroddy, I think this is a nice and clean solution!

I did run the notebooks, but they must be using these current values.

This surprised me, so I had a look. I guess you used our noxfile ... where we forgot to add the --inplace flag to the jupyter execute so that the execution actually changes the notebooks! At the moment, the notebooks run, but their outputs aren't stored anywhere (and our examples' HTML artefacts therefore never change). That's on me, I should have picked up on it in #367.

No, I ran them manually and verified it worked by changing the top level .matplotlibrc

@paddyroddy paddyroddy merged commit 382bafd into main Nov 28, 2024
15 checks passed
@paddyroddy paddyroddy deleted the paddy/issue-398 branch November 28, 2024 09:46
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 enhancement New feature or request science Science improvement or question
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a matplotlibrc to control the resolution of the notebooks figures
3 participants