Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 43016ac

Browse filesBrowse files
committed
Include the default of "plot_pre_code" of the plot directive in the documentation
1 parent 0b7e02d commit 43016ac
Copy full SHA for 43016ac

File tree

Expand file treeCollapse file tree

1 file changed

+5
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-1
lines changed

‎lib/matplotlib/sphinxext/plot_directive.py

Copy file name to clipboardExpand all lines: lib/matplotlib/sphinxext/plot_directive.py
+5-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.