Skip to content

Commit 6468ac7

Browse files
author
Robert (Bob) Turner
committed
remove redundant code
1 parent c8eb52c commit 6468ac7

File tree

5 files changed

+0
-15
lines changed

5 files changed

+0
-15
lines changed

episodes/04-drawing.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ image = skimage.io.imread(fname="data/maize-seedlings.tif")
7070
7171
fig, ax = plt.subplots()
7272
plt.imshow(image)
73-
plt.show()
7473
~~~
7574
{: .language-python}
7675

@@ -118,7 +117,6 @@ mask[rr, cc] = False
118117
# Display mask image
119118
fig, ax = plt.subplots()
120119
plt.imshow(mask, cmap="gray")
121-
plt.show()
122120
~~~
123121
{: .language-python}
124122

@@ -362,7 +360,6 @@ Then, we display the masked image.
362360
~~~
363361
fig, ax = plt.subplots()
364362
plt.imshow(image)
365-
plt.show()
366363
~~~
367364
{: .language-python}
368365

episodes/05-creating-histograms.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ image = skimage.io.imread(fname="data/plant-seedling.jpg", as_gray=True)
5757
# display the image
5858
fig, ax = plt.subplots()
5959
plt.imshow(image, cmap="gray")
60-
plt.show()
6160
~~~
6261
{: .language-python}
6362

@@ -252,7 +251,6 @@ image = skimage.io.imread(fname="data/plant-seedling.jpg")
252251
# display the image
253252
fig, ax = plt.subplots()
254253
plt.imshow(image)
255-
plt.show()
256254
~~~
257255
{: .language-python}
258256

episodes/06-blurring.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,6 @@ image = skimage.io.imread(fname="data/gaussian-original.png")
241241
# display the image
242242
fig, ax = plt.subplots()
243243
plt.imshow(image)
244-
plt.show()
245244
~~~
246245
{: .language-python}
247246
![Original image](../data/gaussian-original.png)
@@ -279,7 +278,6 @@ Finally, we display the blurred image:
279278
# display blurred image
280279
fig, ax = plt.subplots()
281280
plt.imshow(blurred)
282-
plt.show()
283281
~~~
284282
{: .language-python}
285283
![Original image](../fig/gaussian-blurred.png)

episodes/07-thresholding.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ image = skimage.io.imread("data/shapes-01.jpg")
6565
6666
fig, ax = plt.subplots()
6767
plt.imshow(image)
68-
plt.show()
6968
~~~
7069
{: .language-python}
7170

@@ -95,7 +94,6 @@ blurred_image = skimage.filters.gaussian(gray_image, sigma=1.0)
9594
9695
fig, ax = plt.subplots()
9796
plt.imshow(blurred_image, cmap="gray")
98-
plt.show()
9997
~~~
10098
{: .language-python}
10199

@@ -163,7 +161,6 @@ binary_mask = blurred_image < t
163161
164162
fig, ax = plt.subplots()
165163
plt.imshow(binary_mask, cmap="gray")
166-
plt.show()
167164
~~~
168165
{: .language-python}
169166

@@ -208,7 +205,6 @@ selection[~binary_mask] = 0
208205
209206
fig, ax = plt.subplots()
210207
plt.imshow(selection)
211-
plt.show()
212208
~~~
213209
{: .language-python}
214210

@@ -318,7 +314,6 @@ image = skimage.io.imread(fname="data/maize-root-cluster.jpg")
318314

319315
fig, ax = plt.subplots()
320316
plt.imshow(image)
321-
plt.show()
322317
~~~
323318
{: .language-python}
324319
@@ -386,7 +381,6 @@ binary_mask = blurred_image > t
386381

387382
fig, ax = plt.subplots()
388383
plt.imshow(binary_mask, cmap="gray")
389-
plt.show()
390384
~~~
391385
{: .language-python}
392386
@@ -401,7 +395,6 @@ selection[~binary_mask] = 0
401395

402396
fig, ax = plt.subplots()
403397
plt.imshow(selection)
404-
plt.show()
405398
~~~
406399
{: .language-python}
407400

setup.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ e.g. your Desktop or a folder you have created for using in this workshop.
8585
# display the image
8686
fig, ax = plt.subplots()
8787
plt.imshow(image, cmap='gray')
88-
plt.show()
8988
~~~
9089
{: .language-python}
9190
Upon execution of the cell, an image should be displayed in an interactive widget. When hovering over the image with the mouse pointer, the pixel coordinates and color values are displayed below the image.

0 commit comments

Comments
 (0)