Skip to content

Commit b81d945

Browse files
committed
also remove plt.show() in 08-connected-components.md
1 parent 5935eab commit b81d945

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

_episodes/08-connected-components.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,7 @@ labeled_image, count = connected_components(filename="data/shapes-01.jpg", sigma
297297

298298
fig, ax = plt.subplots()
299299
plt.imshow(labeled_image)
300-
plt.axis("off")
301-
plt.show()
300+
plt.axis("off");
302301
~~~
303302
{: .language-python}
304303
@@ -357,8 +356,7 @@ colored_label_image = skimage.color.label2rgb(labeled_image, bg_label=0)
357356

358357
fig, ax = plt.subplots()
359358
plt.imshow(colored_label_image)
360-
plt.axis("off")
361-
plt.show()
359+
plt.axis("off");
362360
~~~
363361
{: .language-python}
364362
@@ -499,8 +497,7 @@ This will produce the output
499497
> > fig, ax = plt.subplots()
500498
> > plt.hist(object_areas)
501499
> > plt.xlabel("Area (pixels)")
502-
> > plt.ylabel("Number of objects")
503-
> > plt.show()
500+
> > plt.ylabel("Number of objects");
504501
> > ~~~
505502
> > {: .language-python}
506503
> >
@@ -690,8 +687,7 @@ This will produce the output
690687
> >
691688
> > fig, ax = plt.subplots()
692689
> > plt.imshow(colored_label_image)
693-
> > plt.axis("off")
694-
> > plt.show()
690+
> > plt.axis("off");
695691
> >
696692
> > print("Found", count, "objects in the image.")
697693
> > ~~~
@@ -736,8 +732,7 @@ This will produce the output
736732
> > im = plt.imshow(colored_area_image)
737733
> > cbar = fig.colorbar(im, ax=ax, shrink=0.85)
738734
> > cbar.ax.set_title("Area")
739-
> > plt.axis("off")
740-
> > plt.show()
735+
> > plt.axis("off");
741736
> > ~~~
742737
> > {: .language-python}
743738
> >

0 commit comments

Comments
 (0)