Skip to content

Commit 105ebb9

Browse files
author
Robert (Bob) Turner
committed
remove remaining plt.show()
1 parent b81d945 commit 105ebb9

File tree

4 files changed

+0
-24
lines changed

4 files changed

+0
-24
lines changed

_episodes/04-drawing.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,6 @@ The function returns the rectangle as row (`rr`) and column (`cc`) coordinate ar
217217
> > # Display the image
218218
> > fig, ax = plt.subplots()
219219
> > plt.imshow(image)
220-
> > plt.show()
221220
> > ~~~
222221
> > {: .language-python}
223222
> >
@@ -248,7 +247,6 @@ The function returns the rectangle as row (`rr`) and column (`cc`) coordinate ar
248247
> > # display the results
249248
> > fig, ax = plt.subplots()
250249
> > plt.imshow(image)
251-
> > plt.show()
252250
> > ~~~
253251
> > {: .language-python}
254252
> >
@@ -298,7 +296,6 @@ The function returns the rectangle as row (`rr`) and column (`cc`) coordinate ar
298296
> > # display the results
299297
> > fig, ax = plt.subplots()
300298
> > plt.imshow(image)
301-
> > plt.show()
302299
> > ~~~
303300
> > {: .language-python}
304301
> {: .solution}
@@ -405,7 +402,6 @@ The resulting masked image should look like this:
405402
> > # Display the result
406403
> > fig, ax = plt.subplots()
407404
> > plt.imshow(image)
408-
> > plt.show()
409405
> > ~~~
410406
> > {: .language-python}
411407
> {: .solution}
@@ -422,7 +418,6 @@ The resulting masked image should look like this:
422418
> # Display the image
423419
> fig, ax = plt.subplots()
424420
> plt.imshow(image)
425-
> plt.show()
426421
> ~~~
427422
> {: .language-python}
428423
>
@@ -469,7 +464,6 @@ The resulting masked image should look like this:
469464
> > # display the result
470465
> > fig, ax = plt.subplots()
471466
> > plt.imshow(image)
472-
> > plt.show()
473467
> > ~~~
474468
> > {: .language-python}
475469
> >
@@ -538,7 +532,6 @@ The resulting masked image should look like this:
538532
> > # display the result
539533
> > fig, ax = plt.subplots()
540534
> > plt.imshow(image)
541-
> > plt.show()
542535
> > ~~~
543536
> > {: .language-python}
544537
> {: .solution}

_episodes/05-creating-histograms.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ plt.ylabel("pixel count")
122122
plt.xlim([0.0, 1.0]) # <- named arguments do not work here
123123
124124
plt.plot(bin_edges[0:-1], histogram) # <- or here
125-
plt.show()
126125
~~~
127126
{: .language-python}
128127

@@ -201,7 +200,6 @@ it produces this histogram:
201200
> > # display the image
202201
> > fig, ax = plt.subplots()
203202
> > plt.imshow(image, cmap="gray")
204-
> > plt.show()
205203
> >
206204
> > # create mask here, using np.zeros() and skimage.draw.rectangle()
207205
> > mask = np.zeros(shape=image.shape, dtype="bool")
@@ -211,7 +209,6 @@ it produces this histogram:
211209
> > # display the mask
212210
> > fig, ax = plt.subplots()
213211
> > plt.imshow(mask, cmap="gray")
214-
> > plt.show()
215212
> >
216213
> > # mask the image and create the new histogram
217214
> > histogram, bin_edges = np.histogram(image[mask], bins=256, range=(0.0, 1.0))
@@ -225,7 +222,6 @@ it produces this histogram:
225222
> > plt.xlim([0.0, 1.0])
226223
> > plt.plot(bin_edges[0:-1], histogram)
227224
> >
228-
> > plt.show()
229225
> > ~~~
230226
> > {: .language-python}
231227
> >
@@ -280,8 +276,6 @@ for channel_id, c in zip(channel_ids, colors):
280276
plt.title("Color Histogram")
281277
plt.xlabel("Color value")
282278
plt.ylabel("Pixel count")
283-
284-
plt.show()
285279
~~~
286280
{: .language-python}
287281
@@ -379,7 +373,6 @@ Finally we label our axes and display the histogram, shown here:
379373
> # display the image
380374
> fig, ax = plt.subplots()
381375
> plt.imshow(image)
382-
> plt.show()
383376
> ~~~
384377
> {: .language-python}
385378
> ![Well plate image](../fig/wellplate-02.jpg)
@@ -420,7 +413,6 @@ Finally we label our axes and display the histogram, shown here:
420413
> > # validity of your mask
421414
> > fig, ax = plt.subplots()
422415
> > plt.imshow(masked_img)
423-
> > plt.show()
424416
> >
425417
> > # list to select colors of each channel line
426418
> > colors = ("red", "green", "blue")
@@ -442,7 +434,6 @@ Finally we label our axes and display the histogram, shown here:
442434
> > plt.xlabel("color value")
443435
> > plt.ylabel("pixel count")
444436
> >
445-
> > plt.show()
446437
> > ~~~
447438
> > {: .language-python}
448439
> {: .solution}

_episodes/06-blurring.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,6 @@ plt.imshow(blurred)
323323
> > # display blurred image
324324
> > fig, ax = plt.subplots()
325325
> > plt.imshow(blurred)
326-
> > plt.show()
327326
> > ~~~
328327
> > {: .language-python}
329328
> >

_episodes/07-thresholding.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ plt.title("Grayscale Histogram")
126126
plt.xlabel("grayscale value")
127127
plt.ylabel("pixels")
128128
plt.xlim(0, 1.0)
129-
plt.show()
130129
~~~
131130
{: .language-python}
132131

@@ -236,7 +235,6 @@ plt.imshow(selection)
236235
> > plt.xlabel("gray value")
237236
> > plt.ylabel("pixel count")
238237
> > plt.xlim(0, 1.0)
239-
> > plt.show()
240238
> > ~~~
241239
> > {: .language-python}
242240
> >
@@ -265,7 +263,6 @@ plt.imshow(selection)
265263
> >
266264
> > fig, ax = plt.subplots()
267265
> > plt.imshow(binary_mask, cmap="gray")
268-
> > plt.show()
269266
> > ~~~
270267
> > {: .language-python}
271268
> >
@@ -279,7 +276,6 @@ plt.imshow(selection)
279276
> >
280277
> > fig, ax = plt.subplots()
281278
> > plt.imshow(selection)
282-
> > plt.show()
283279
> > ~~~
284280
> > {: .language-python}
285281
> >
@@ -337,7 +333,6 @@ plt.title("Graylevel histogram")
337333
plt.xlabel("gray value")
338334
plt.ylabel("pixel count")
339335
plt.xlim(0, 1.0)
340-
plt.show()
341336
~~~
342337
{: .language-python}
343338
@@ -696,7 +691,6 @@ data/trial-293.jpg,0.13607895611702128
696691
> > plt.xlabel("gray value")
697692
> > plt.ylabel("pixel count")
698693
> > plt.xlim(0, 1.0)
699-
> > plt.show()
700694
> > ~~~
701695
> > {: .language-python}
702696
> >
@@ -717,7 +711,6 @@ data/trial-293.jpg,0.13607895611702128
717711
> >
718712
> > fig, ax = plt.subplots()
719713
> > plt.imshow(binary_mask, cmap="gray")
720-
> > plt.show()
721714
> > ~~~
722715
> > {: .language-python}
723716
> >

0 commit comments

Comments
 (0)