Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c85d69c

Browse files
tacaswellMeeseeksDev[bot]
authored and
MeeseeksDev[bot]
committed
Backport PR #9272: Include the default of "plot_pre_code" of the plot directive in the documentation
1 parent 032b374 commit c85d69c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/matplotlib/sphinxext/plot_directive.py

Lines changed: 5 additions & 1 deletion
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)