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

Skip to content

Commit ca8a3d5

Browse files
committed
Remove pointless draw() at the end of static examples.
draw() is completely unnecessary in these examples and only serves to (mildly) confuse the reader.
1 parent 250c33e commit ca8a3d5

20 files changed

+0
-24
lines changed

examples/axes_grid1/demo_axes_divider.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ def demo():
126126
ax = fig1.add_subplot(2, 2, 4)
127127
demo_images_side_by_side(ax)
128128

129-
plt.draw()
130129
plt.show()
131130

132131

examples/axes_grid1/demo_axes_grid.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,5 +135,4 @@ def demo_grid_with_each_cbar_labelled(fig):
135135
demo_grid_with_each_cbar(F)
136136
demo_grid_with_each_cbar_labelled(F)
137137

138-
plt.draw()
139138
plt.show()

examples/axes_grid1/demo_axes_grid2.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,5 +116,4 @@ def add_inner_title(ax, title, loc, size=None, **kwargs):
116116
grid2[0].set_xticks([-2, 0])
117117
grid2[0].set_yticks([-2, 0, 2])
118118

119-
plt.draw()
120119
plt.show()

examples/axes_grid1/demo_colorbar_with_inset_locator.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,4 @@
3535
im = ax2.imshow([[1, 2], [2, 3]])
3636
plt.colorbar(im, cax=axins, ticks=[1, 2, 3])
3737

38-
plt.draw()
3938
plt.show()

examples/axes_grid1/demo_edge_colorbar.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,5 +90,4 @@ def demo_right_cbar(fig):
9090
demo_bottom_cbar(F)
9191
demo_right_cbar(F)
9292

93-
plt.draw()
9493
plt.show()

examples/axes_grid1/parasite_simple2.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,4 @@
4444
ax_kms.set_ylim(950, 3100)
4545
# xlim and ylim of ax_pms will be automatically adjusted.
4646

47-
plt.draw()
4847
plt.show()

examples/axes_grid1/scatter_hist_locatable_axes.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,4 @@
5151

5252
axHisty.set_xticks([0, 50, 100])
5353

54-
plt.draw()
5554
plt.show()

examples/axes_grid1/simple_axesgrid2.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,4 @@ def get_demo_image():
3535
ax.imshow(im, origin="lower", vmin=vmin,
3636
vmax=vmax, interpolation="nearest")
3737

38-
plt.draw()
3938
plt.show()

examples/axes_grid1/simple_axisline4.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,4 @@
2020
ax2.axis["right"].major_ticklabels.set_visible(False)
2121
ax2.axis["top"].major_ticklabels.set_visible(True)
2222

23-
plt.draw()
2423
plt.show()

examples/axisartist/demo_curvelinear_grid.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,5 +137,4 @@ def curvelinear_test2(fig):
137137
curvelinear_test1(fig)
138138
curvelinear_test2(fig)
139139

140-
plt.draw()
141140
plt.show()

examples/axisartist/demo_parasite_axes2.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,4 @@
6262
par1.axis["right"].label.set_color(p2.get_color())
6363
par2.axis["right"].label.set_color(p3.get_color())
6464

65-
plt.draw()
6665
plt.show()

examples/pyplots/whats_new_99_axes_grid.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ def get_rgb():
4848
ax.RGB.set_xlim(0., 9.5)
4949
ax.RGB.set_ylim(0.9, 10.6)
5050

51-
52-
plt.draw()
5351
plt.show()
5452

5553
#############################################################################

examples/scales/aspect_loglog.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,4 @@
2323
ax2.set_aspect(1)
2424
ax2.set_title("adjustable = datalim")
2525

26-
plt.draw()
2726
plt.show()

examples/shapes_and_collections/fancybox_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,6 @@ def test_all():
189189
ax.set_ylim(0., 1.)
190190
ax.set_aspect(2.)
191191

192-
plt.draw()
193192
plt.show()
194193

195194

examples/text_labels_and_annotations/arrow_demo.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,4 @@ def draw_arrow(pair, alpha=alpha, ec=ec, labelcolor=labelcolor):
311311
make_arrow_plot(d, display=display, linewidth=0.001, edgecolor=None,
312312
normalize_data=scaled, head_starts_at_zero=True, size=size)
313313

314-
plt.draw()
315-
316314
plt.show()

examples/text_labels_and_annotations/demo_text_path.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,5 +155,4 @@ def draw(self, renderer=None):
155155
ax.set_xlim(0, 1)
156156
ax.set_ylim(0, 1)
157157

158-
plt.draw()
159158
plt.show()

examples/text_labels_and_annotations/fancyarrow_demo.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,4 @@ def to_texstring(s):
5151
ax.xaxis.set_visible(False)
5252
ax.yaxis.set_visible(False)
5353

54-
55-
plt.draw()
5654
plt.show()

examples/text_labels_and_annotations/fancytextbox_demo.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,4 @@
2222
)
2323
)
2424

25-
26-
plt.draw()
2725
plt.show()

examples/text_labels_and_annotations/multiline.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,4 @@
4242
plt.title("test line spacing for multiline text")
4343

4444
plt.subplots_adjust(bottom=0.25, top=0.75)
45-
plt.draw()
4645
plt.show()

examples/text_labels_and_annotations/usetex_baseline_test.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,4 @@ def test_window_extent(ax, usetex, preview):
7070
test_window_extent(ax, usetex=usetex, preview=preview)
7171

7272

73-
plt.draw()
7473
plt.show()

0 commit comments

Comments
 (0)