swcarpentry / python-novice-gapminder

Plotting and Programming in Python
http://swcarpentry.github.io/python-novice-gapminder/
Other
162 stars 428 forks source link

make sure plot elements are not truncated #650

Open Simon-Stone opened 1 year ago

Simon-Stone commented 1 year ago

Fixes #638 by adding calls to tight_layout to the respective solution.

github-actions[bot] commented 1 year ago

Thank you!

Thank you for your pull request :smiley:

:robot: This automated message can help you check the rendered files in your submission for clarity. If you have any questions, please feel free to open an issue in {sandpaper}.

If you have files that automatically render output (e.g. R Markdown), then you should check for the following:

Rendered Changes

:mag: Inspect the changes: https://github.com/swcarpentry/python-novice-gapminder/compare/md-outputs..md-outputs-PR-650

The following changes were observed in the rendered markdown documents:

 09-plotting.md | 10 +++++++++-
 md5sum.txt     |  2 +-
 2 files changed, 10 insertions(+), 2 deletions(-)
What does this mean? If you have source files that require output and figures to be generated (e.g. R Markdown), then it is important to make sure the generated figures and output are reproducible. This output provides a way for you to inspect the output in a diff-friendly manner so that it's easy to see the changes that occur due to new software versions or randomisation.

:stopwatch: Updated at 2024-03-17 08:41:02 +0000

martinosorb commented 11 months ago

It looks good to me but I'd like opinions from other maintainers before merging.

alee commented 11 months ago

I think it's a good addition as well. Only thing a bit leery of is the caveat in the docs This is an experimental feature and may not work for some cases. It only checks the extents of ticklabels, axis labels, and titles. if that's still true.

We could also consider changing the example code to use constrained layouts instead?