8000 FIX: include function_name in output filename is used · matplotlib/matplotlib@f4971af · GitHub
[go: up one dir, main page]

Skip to content

Commit f4971af

Browse files
committed
FIX: include function_name in output filename is used
This allows multiple functions from the same file to be called.
1 parent 7c0d03a commit f4971af

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/matplotlib/sphinxext/plot_directive.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,8 @@ def render_figures(code, code_path, output_dir, output_base, context,
566566
Save the images under *output_dir* with file names derived from
567567
*output_base*
568568
"""
569+
if function_name is not None:
570+
output_base = f'{output_base}_{function_name}'
569571
formats = get_plot_formats(config)
570572

571573
# Try to determine if all images already exist

0 commit comments

Comments
 (0)
0