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

Skip to content

Commit 9c8b7e6

Browse files
committed
Add plt.show to some examples.
1 parent a4f4747 commit 9c8b7e6

7 files changed

Lines changed: 8 additions & 10 deletions

File tree

examples/pylab_examples/barchart_demo2.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,3 +160,4 @@ def plot_student_results(student, scores, cohort_size):
160160
cohort_size = 62 # The number of other 2nd grade boys
161161

162162
arts = plot_student_results(student, scores, cohort_size)
163+
plt.show()

examples/pyplots/dollar_ticks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
tick.label2On = True
1818
tick.label2.set_color('green')
1919

20-
20+
plt.show()

examples/pyplots/fig_axes_customize_simple.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,4 @@
2323
line.set_markersize(25)
2424
line.set_markeredgewidth(3)
2525

26-
27-
26+
plt.show()

examples/pyplots/fig_axes_labels_simple.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@
1919
facecolor='yellow', edgecolor='yellow')
2020
ax2.set_xlabel('time (s)')
2121

22-
22+
plt.show()

examples/pyplots/fig_x.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import numpy as np
22
import matplotlib.pyplot as plt
33
import matplotlib.lines as lines
4+
5+
46
fig = plt.figure()
57

68
l1 = lines.Line2D([0, 1], [0, 1], transform=fig.transFigure, figure=fig)
@@ -9,4 +11,4 @@
911

1012
fig.lines.extend([l1, l2])
1113

12-
14+
plt.show()

examples/pyplots/whats_new_99_spines.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import matplotlib.pyplot as plt
22
import numpy as np
3-
from matplotlib.pyplot import show
43

54

65
def adjust_spines(ax,spines):
@@ -44,4 +43,4 @@ def adjust_spines(ax,spines):
4443
ax.plot(x,y)
4544
adjust_spines(ax,['bottom'])
4645

47-
show()
46+
plt.show()

lib/matplotlib/tests/test_coding_standards.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,13 +280,10 @@ def test_pep8_conformance_examples():
280280
'*/pyplots/tex_demo.py',
281281
'*/pyplots/compound_path_demo.py',
282282
'*/pyplots/text_commands.py',
283-
'*/pyplots/dollar_ticks.py',
284283
'*/pyplots/text_layout.py',
285284
'*/pyplots/fig_axes_customize_simple.py',
286285
'*/pyplots/whats_new_1_subplot3d.py',
287-
'*/pyplots/fig_axes_labels_simple.py',
288286
'*/pyplots/whats_new_98_4_fancy.py',
289-
'*/pyplots/fig_x.py',
290287
'*/pyplots/whats_new_98_4_fill_between.py',
291288
'*/pyplots/whats_new_98_4_legend.py',
292289
'*/pyplots/pyplot_annotate.py',

0 commit comments

Comments
 (0)