File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -97,6 +97,9 @@ def plot_directive_file(num):
97
97
assert filecmp .cmp (range_6 , plot_file (17 ))
98
98
# plot 22 is from the range6.py file again, but a different function
99
99
assert filecmp .cmp (range_10 , img_dir / 'range6_range10.png' )
100
+ # plots 23 and 24 use a custom base name with {counter}
101
+ assert filecmp .cmp (range_4 , img_dir / 'custom-base-name-18.png' )
102
+ assert filecmp .cmp (range_6 , img_dir / 'custom-base-name-19.png' )
100
103
101
104
# Modify the included plot
102
105
contents = (tmp_path / 'included_plot_21.rst' ).read_bytes ()
Original file line number Diff line number Diff line change @@ -174,3 +174,15 @@ Plot 21 is generated via an include directive:
174
174
Plot 22 uses a different specific function in a file with plot commands:
175
175
176
176
.. plot :: range6.py range10
177
+
178
+ Plots 23 and 24 use output-base-name with a {counter}.
179
+
180
+ .. plot ::
181
+ :output-base-name: custom-base-name-{counter}
182
+
183
+ plt.plot(range(4))
184
+
185
+ .. plot ::
186
+ :output-base-name: custom-base-name-{counter}
187
+
188
+ plt.plot(range(6))
You can’t perform that action at this time.
0 commit comments