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

Skip to content

Commit 6709b59

Browse files
authored
Merge pull request #7398 from wgma00/master
Moved python files from doc/pyplots to examples folder
2 parents fd2e62d + ce661b0 commit 6709b59

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+77
-34
lines changed

doc/devel/documenting_mpl.rst

Lines changed: 2 additions & 2 deletions

doc/faq/howto_faq.rst

Lines changed: 2 additions & 2 deletions

doc/make.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def clean():
119119
'mpl_examples/pylab_examples/*.png',
120120
'mpl_examples/pylab_examples/*.pdf',
121121
'mpl_examples/units/*.png',
122-
'pyplots/tex_demo.png',
122+
'mpl_examples/pyplots/tex_demo.png',
123123
'_static/matplotlibrc',
124124
'_templates/gallery.html',
125125
'users/installing.rst']:

doc/users/annotations.rst

Lines changed: 2 additions & 2 deletions

doc/users/artists.rst

Lines changed: 4 additions & 4 deletions

doc/users/mathtext.rst

Lines changed: 1 addition & 1 deletion

doc/users/path_tutorial.rst

Lines changed: 1 addition & 1 deletion

doc/users/prev_whats_new/whats_new_0.98.4.rst

Lines changed: 3 additions & 3 deletions

doc/users/prev_whats_new/whats_new_0.99.rst

Lines changed: 3 additions & 3 deletions

doc/users/prev_whats_new/whats_new_1.0.rst

Lines changed: 1 addition & 1 deletion

doc/users/pyplot_tutorial.rst

Lines changed: 7 additions & 7 deletions

doc/users/screenshots.rst

Lines changed: 1 addition & 1 deletion

doc/users/text_intro.rst

Lines changed: 1 addition & 1 deletion

doc/users/text_props.rst

Lines changed: 1 addition & 1 deletion

doc/users/transforms_tutorial.rst

Lines changed: 1 addition & 1 deletion

doc/users/usetex.rst

Lines changed: 1 addition & 1 deletion

doc/pyplots/align_ylabels.py renamed to examples/pyplots/align_ylabels.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
fig = plt.figure()
77
fig.subplots_adjust(left=0.2, wspace=0.6)
88

9+
# Fixing random state for reproducibility
10+
np.random.seed(19680801)
911

1012
ax1 = fig.add_subplot(221)
1113
ax1.plot(2000*np.random.rand(10))

doc/pyplots/boxplot_demo.py renamed to examples/pyplots/boxplot_demo.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
import numpy as np
88
import matplotlib.pyplot as plt
99

10-
np.random.seed(0)
10+
# Fixing random state for reproducibility
11+
np.random.seed(19680801)
1112

1213
# fake up some data
1314
spread = np.random.rand(50) * 100

doc/pyplots/compound_path_demo.py renamed to examples/pyplots/compound_path_demo.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
fig = plt.figure()
88
ax = fig.add_subplot(111)
99

10+
# Fixing random state for reproducibility
11+
np.random.seed(19680801)
12+
1013
# histogram our data with numpy
1114
data = np.random.randn(1000)
1215
n, bins = np.histogram(data, 100)

doc/pyplots/dollar_ticks.py renamed to examples/pyplots/dollar_ticks.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
import matplotlib.pyplot as plt
33
import matplotlib.ticker as ticker
44

5+
# Fixing random state for reproducibility
6+
np.random.seed(19680801)
7+
58
fig = plt.figure()
69
ax = fig.add_subplot(111)
710
ax.plot(100*np.random.rand(20))

doc/pyplots/fig_axes_labels_simple.py renamed to examples/pyplots/fig_axes_labels_simple.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
s = np.sin(2*np.pi*t)
1212
line, = ax1.plot(t, s, color='blue', lw=2)
1313

14+
# Fixing random state for reproducibility
15+
np.random.seed(19680801)
16+
1417
ax2 = fig.add_axes([0.15, 0.1, 0.7, 0.3])
1518
n, bins, patches = ax2.hist(np.random.randn(1000), 50,
1619
facecolor='yellow', edgecolor='yellow')
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

doc/pyplots/pyplot_scales.py renamed to examples/pyplots/pyplot_scales.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33

44
from matplotlib.ticker import NullFormatter # useful for `logit` scale
55

6+
# Fixing random state for reproducibility
7+
np.random.seed(19680801)
8+
69
# make up some data in the interval ]0, 1[
710
y = np.random.normal(loc=0.5, scale=0.4, size=1000)
811
y = y[(y > 0) & (y < 1)]
File renamed without changes.

doc/pyplots/pyplot_text.py renamed to examples/pyplots/pyplot_text.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import numpy as np
22
import matplotlib.pyplot as plt
33

4+
# Fixing random state for reproducibility
5+
np.random.seed(19680801)
6+
47
mu, sigma = 100, 15
58
x = mu + sigma * np.random.randn(10000)
69

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

lib/matplotlib/tests/test_coding_standards.py

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,32 @@ def test_pep8_conformance_examples():
265265
'*/pylab_examples/tricontour_demo.py',
266266
'*/pylab_examples/tripcolor_demo.py',
267267
'*/pylab_examples/triplot_demo.py',
268-
'*/shapes_and_collections/artist_reference.py']
268+
'*/shapes_and_collections/artist_reference.py',
269+
'*/pyplots/align_ylabels.py',
270+
'*/pyplots/annotate_transform.py',
271+
'*/pyplots/pyplot_simple.py',
272+
'*/pyplots/annotation_basic.py',
273+
'*/pyplots/annotation_polar.py',
274+
'*/pyplots/auto_subplots_adjust.py',
275+
'*/pyplots/pyplot_two_subplots.py',
276+
'*/pyplots/boxplot_demo.py',
277+
'*/pyplots/tex_demo.py',
278+
'*/pyplots/compound_path_demo.py',
279+
'*/pyplots/text_commands.py',
280+
'*/pyplots/dollar_ticks.py',
281+
'*/pyplots/text_layout.py',
282+
'*/pyplots/fig_axes_customize_simple.py',
283+
'*/pyplots/whats_new_1_subplot3d.py',
284+
'*/pyplots/fig_axes_labels_simple.py',
285+
'*/pyplots/whats_new_98_4_fancy.py',
286+
'*/pyplots/fig_x.py',
287+
'*/pyplots/whats_new_98_4_fill_between.py',
288+
'*/pyplots/whats_new_98_4_legend.py',
289+
'*/pyplots/pyplot_annotate.py',
290+
'*/pyplots/whats_new_99_axes_grid.py',
291+
'*/pyplots/pyplot_formatstr.py',
292+
'*/pyplots/pyplot_mathtext.py',
293+
'*/pyplots/whats_new_99_spines.py']
269294
assert_pep8_conformance(dirname=exdir,
270295
extra_exclude_directories=blacklist,
271296
pep8_additional_ignore=PEP8_ADDITIONAL_IGNORE +

0 commit comments

Comments
 (0)