Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Makefile html-noplot,clean: constrained layout tutorial image handling #24445

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

Merged
merged 1 commit into from
Feb 1, 2023

Conversation

rcomer
Copy link
Member

@rcomer rcomer commented Nov 13, 2022

PR Summary

Follow up to #23870. It seems I somehow missed a couple of warnings that are thrown when running make html-noplot. Perhaps my branch was not fully up-to-date.

/home/ruth/git_stuff/matplotlib/doc/tutorials/intermediate/constrainedlayout_guide.rst:: WARNING: image file not readable: _static/constrained_layout_1b.png
/home/ruth/git_stuff/matplotlib/doc/tutorials/intermediate/constrainedlayout_guide.rst:: WARNING: image file not readable: _static/constrained_layout_2b.png

My current change is very specific to the constrained layout tutorial, but it looks like the image handling in the constrained layout tutorial is very specific to issues encountered there: #22289 (comment), sphinx-gallery/sphinx-gallery#726.

PR Checklist

Tests and Styling

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (install flake8-docstrings and run flake8 --docstring-convention=all).

Documentation

  • Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • New plotting related features are documented with examples.

Release Notes

  • New features are marked with a .. versionadded:: directive in the docstring and documented in doc/users/next_whats_new/
  • API changes are marked with a .. versionchanged:: directive in the docstring and documented in doc/api/next_api_changes/
  • Release notes conform with instructions in next_whats_new/README.rst or next_api_changes/README.rst

@rcomer
Copy link
Member Author

rcomer commented Nov 13, 2022

Updated so that these images get tidied by make clean. Perhaps my previous reliance on make clean is why I didn't see these warnings last time.

@rcomer rcomer changed the title html-noplot: filter warnings for constrained layout tutorial images Makefile html-noplot,clean: constrained layout tutorial image handling Nov 13, 2022
@jklymak
Copy link
Member

jklymak commented Nov 14, 2022

Constrained layout needs to show the difference between bbox_inches='tight' and not calling that, so it saves the image and then links it. We could just commit the image, but if things change, someone would have to remember to regenerate it. This seemed easiest. Alternates five years ago were non-trivial: sphinx-gallery/sphinx-gallery#726

@tacaswell tacaswell added this to the v3.8.0 milestone Feb 1, 2023
@tacaswell tacaswell merged commit faf88bf into matplotlib:main Feb 1, 2023
@rcomer rcomer deleted the noplot-warning branch February 2, 2023 19:40
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