Skip to content

Commit 9986196

Browse files
authored
Merge pull request #9272 from MSeifert04/include-plot-directive-precode-default
DOC: Include the default of "plot_pre_code" of the plot directive in the documentation
2 parents 0b7e02d + 43016ac commit 9986196

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/matplotlib/sphinxext/plot_directive.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,11 @@
9090
Whether to show a link to the source in HTML.
9191
9292
plot_pre_code
93-
Code that should be executed before each plot.
93+
Code that should be executed before each plot. If not specified or None
94+
it will default to a string containing::
95+
96+
import numpy as np
97+
from matplotlib import pyplot as plt
9498
9599
plot_basedir
96100
Base directory, to which ``plot::`` file names are relative

0 commit comments

Comments
 (0)