Title: [ENH]: Support caption for code block in sphinx plot directive · Issue #30740 · matplotlib/matplotlib · GitHub
Open Graph Title: [ENH]: Support caption for code block in sphinx plot directive · Issue #30740 · matplotlib/matplotlib
X Title: [ENH]: Support caption for code block in sphinx plot directive · Issue #30740 · matplotlib/matplotlib
Description: Problem It would be very nice to be able to provide a :caption: for the .. code directive produced internally when using the .. plot directive in sphinx documentation. Proposed solution Add support for a :code-caption: option for the .. ...
Open Graph Description: Problem It would be very nice to be able to provide a :caption: for the .. code directive produced internally when using the .. plot directive in sphinx documentation. Proposed solution Add support...
X Description: Problem It would be very nice to be able to provide a :caption: for the .. code directive produced internally when using the .. plot directive in sphinx documentation. Proposed solution Add support...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/30740
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[ENH]: Support caption for code block in sphinx plot directive","articleBody":"### Problem\n\nIt would be very nice to be able to provide a [`:caption:` for the `.. code` directive](https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-option-code-block-caption) produced internally when using the `.. plot` directive in sphinx documentation.\n\n### Proposed solution\n\nAdd support for a `:code-caption:` option for the `.. plot` directive.","author":{"url":"https://github.com/duncanmmacleod","@type":"Person","name":"duncanmmacleod"},"datePublished":"2025-11-11T12:40:53.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/30740/matplotlib/issues/30740"}
| 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:7984ef78-9a2c-cc0e-db13-8cfc32f8642d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AFFE:1BB425:A3D1D7:DAE924:6A531491 |
| html-safe-nonce | 7d0fe49f59fca8b1420b5e84427a5914e3d5a78c68ec2ac1034b12170696f9e5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRkZFOjFCQjQyNTpBM0QxRDc6REFFOTI0OjZBNTMxNDkxIiwidmlzaXRvcl9pZCI6IjQ3MzM1NDAzMDI1OTc1OTIyMDkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 121850a42eec98542fc9e35dbb4a34971a35cd2e6f3a6c9200a98285f1309126 |
| hovercard-subject-tag | issue:3612157150 |
| 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/30740/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6577095ebe4ddd3fd7904ca7a187d9888756aef8f5057a05eee64b439315b427/matplotlib/matplotlib/issues/30740 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6577095ebe4ddd3fd7904ca7a187d9888756aef8f5057a05eee64b439315b427/matplotlib/matplotlib/issues/30740 |
| og:image:alt | Problem It would be very nice to be able to provide a :caption: for the .. code directive produced internally when using the .. plot directive in sphinx documentation. Proposed solution Add support... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | duncanmmacleod |
| 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