OOification of the new examples from #10306 #10393
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Summary
This PR simply tries to make the examples added in #10306 a bit more consistent with the current trend of promoting the object-oriented API rather than the Pyplot one. I was planning to suggest the small changes in the original thread but the latter got merged while I was writing my post 🐑...
Being there, this PR also slightly increase the title padding in
title_xlabel_top.py
, to make room for the tick labels and prevent a not very nice-looking overlap. Please note that this change could (should) be removed if in the future a feature like #9498 was going to be introduced in Matplotlib.Some questions that may still be open:
tick_label_right.py
<-tick_ylabel_right.py
)PR Checklist