diff --git a/lib/matplotlib/sphinxext/plot_directive.py b/lib/matplotlib/sphinxext/plot_directive.py index 1e92f5a29814..795c39daac73 100644 --- a/lib/matplotlib/sphinxext/plot_directive.py +++ b/lib/matplotlib/sphinxext/plot_directive.py @@ -90,7 +90,11 @@ Whether to show a link to the source in HTML. plot_pre_code - Code that should be executed before each plot. + Code that should be executed before each plot. If not specified or None + it will default to a string containing:: + + import numpy as np + from matplotlib import pyplot as plt plot_basedir Base directory, to which ``plot::`` file names are relative