From 43016ac61f68bd98d5e00e9bcbdeccc1a4772934 Mon Sep 17 00:00:00 2001 From: Michael Seifert Date: Tue, 3 Oct 2017 15:44:58 +0200 Subject: [PATCH] Include the default of "plot_pre_code" of the plot directive in the documentation --- lib/matplotlib/sphinxext/plot_directive.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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