Title: [Doc]: Support of notebook format for docs creation · Issue #25016 · matplotlib/matplotlib · GitHub
Open Graph Title: [Doc]: Support of notebook format for docs creation · Issue #25016 · matplotlib/matplotlib
X Title: [Doc]: Support of notebook format for docs creation · Issue #25016 · matplotlib/matplotlib
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 inconvenie...
Open Graph 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-annota...
X 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-annota...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/25016
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Doc]: Support of notebook format for docs creation","articleBody":"### Problem\r\n\r\nAs soon as one example has more than one sub-example, e.g. here\r\nhttps://matplotlib.org/stable/gallery/text_labels_and_annotations/font_family_rc.html#sphx-glr-gallery-text-labels-and-annotations-font-family-rc-py\r\n\r\nit 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.\r\n\r\n### Suggested improvement\r\n\r\nA good format to support section wise code execution would be `.ipynb`. \r\nWhat do you think about supporting `.ipynb` for creating docs examples? \r\nI 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.\r\n\r\nIn my opinion, a bunch of small examples each showing only one feature is much better than one big example.\r\nMatplotlib has currently many examples that have long and convoluted code (e.g. [1](https://matplotlib.org/stable/gallery/axes_grid1/demo_axes_grid.html),[2](https://matplotlib.org/stable/gallery/shapes_and_collections/artist_reference.html#sphx-glr-gallery-shapes-and-collections-artist-reference-py),[3](https://matplotlib.org/stable/gallery/images_contours_and_fields/contour_image.html#sphx-glr-gallery-images-contours-and-fields-contour-image-py),[4](https://matplotlib.org/stable/gallery/statistics/violinplot.html#sphx-glr-gallery-statistics-violinplot-py)), and I think that might be the case because it's difficult to split examples into smaller chunks with the current infrastructure. \r\n","author":{"url":"https://github.com/kolibril13","@type":"Person","name":"kolibril13"},"datePublished":"2023-01-18T08:34:27.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":22},"url":"https://github.com/25016/matplotlib/issues/25016"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:09a4fc3b-771d-af58-0cf7-19b5ab107560 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B0CC:1FD343:5A695:72287:6A527EBC |
| html-safe-nonce | 6504110f04e810d8e6ae3ee423fc79e9b60667dc68fd4f1475f680bd1a95d2ce |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMENDOjFGRDM0Mzo1QTY5NTo3MjI4Nzo2QTUyN0VCQyIsInZpc2l0b3JfaWQiOiI1Nzg1ODIzMDY5ODI3Mzk5MzU3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 0b15765efe686e2960647c483782239628898da337d423947fc90b2d7f24ed0d |
| hovercard-subject-tag | issue:1537597435 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/25016/issue_layout |
| twitter:image | https://opengraph.githubassets.com/99226fd29401d826e09e0ca4303fb29857b247676545dcff4f7f6474c7c2b162/matplotlib/matplotlib/issues/25016 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/99226fd29401d826e09e0ca4303fb29857b247676545dcff4f7f6474c7c2b162/matplotlib/matplotlib/issues/25016 |
| og:image:alt | 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-annota... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | kolibril13 |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width