Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Commit615017a
committed
Add an output-base-name option to the Sphinx plot directive
This allows specifying the output base name of the generated image files. Thename can include '{counter}', which is automatically string formatted to anincrementing counter. The default if it is not specified is left intact asthe current behavior, which is to use the base name of the provided script orthe RST document.This is required to use the plot directive with MyST, because the directive isbroken with MyST (an issue I don't want to fix), requiring the use ofeval-rst. But the way eval-rst works, the incrementing counter is notmaintained across different eval-rst directives, meaning if you try to includemultiple of them in the same document, the images will overwrite each other.This allows you to manually work around this with something like```{eval-rst}.. plot:: :output-base-name: plot-1 ...``````{eval-rst}.. plot:: :output-base-name: plot-2 ...```Aside from this, it's generally useful to be able to specify the image nameused for a plot, as a more informative name can be used rather than just'<document-name>-1.png'.1 parentce15014 commit615017a
1 file changed
+24
-2
lines changedLines changed: 24 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
47 | 47 |
| |
48 | 48 |
| |
49 | 49 |
| |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
50 | 59 |
| |
51 | 60 |
| |
52 | 61 |
| |
| |||
88 | 97 |
| |
89 | 98 |
| |
90 | 99 |
| |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
91 | 104 |
| |
92 | 105 |
| |
93 | 106 |
| |
| |||
265 | 278 |
| |
266 | 279 |
| |
267 | 280 |
| |
| 281 | + | |
268 | 282 |
| |
269 | 283 |
| |
270 | 284 |
| |
| |||
299 | 313 |
| |
300 | 314 |
| |
301 | 315 |
| |
| 316 | + | |
302 | 317 |
| |
303 | 318 |
| |
304 | 319 |
| |
| |||
734 | 749 |
| |
735 | 750 |
| |
736 | 751 |
| |
| 752 | + | |
737 | 753 |
| |
738 | 754 |
| |
739 | 755 |
| |
| |||
775 | 791 |
| |
776 | 792 |
| |
777 | 793 |
| |
778 |
| - | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
779 | 798 |
| |
780 | 799 |
| |
781 | 800 |
| |
782 | 801 |
| |
783 | 802 |
| |
784 | 803 |
| |
785 |
| - | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
786 | 808 |
| |
787 | 809 |
| |
788 | 810 |
| |
|
0 commit comments
Comments
(0)