Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Description
Problem
As soon as one example has more than one sub-example, e.g. here
https://matplotlib.org/stable/gallery/text_labels_and_annotations/font_family_rc.html#sphx-glr-gallery-text-labels-and-annotations-font-family-rc-py
it is inconvenient to iterate on that example with python files (*.py
), because it's not straight forward to run a python file cell in sections.
Suggested improvement
A good format to support section wise code execution would be.ipynb
.
What do you think about supporting.ipynb
for creating docs examples?
I think that would make iterating over examples easier, and it would encourage contributors to create examples of shorter code blocks with multiple sub-examples. This could also be very useful in the tutorial section.
In my opinion, a bunch of small examples each showing only one feature is much better than one big example.
Matplotlib has currently many examples that have long and convoluted code (e.g.1,2,3,4), and I think that might be the case because it's difficult to split examples into smaller chunks with the current infrastructure.