diff --git a/.flake8 b/.flake8 index ae9a5376d392..bad5b09da8b4 100644 --- a/.flake8 +++ b/.flake8 @@ -82,7 +82,7 @@ per-file-ignores = tutorials/introductory/images.py: E402, E501 tutorials/introductory/pyplot.py: E402, E501 tutorials/introductory/sample_plots.py: E501 - tutorials/introductory/usage.py: E402, E501 + tutorials/introductory/usage.py: E501 tutorials/text/annotations.py: E501 tutorials/text/pgf.py: E501 tutorials/text/text_intro.py: E402 diff --git a/tutorials/introductory/usage.py b/tutorials/introductory/usage.py index 3c2835295323..5777a9be6197 100644 --- a/tutorials/introductory/usage.py +++ b/tutorials/introductory/usage.py @@ -603,18 +603,18 @@ def my_plotter(ax, data1, data2, param_dict): # Prior to version 1.0, show() generally could not be called # more than once in a single script (although sometimes one # could get away with it); for version 1.0.1 and above, this -# restriction is lifted, so one can write a script like this: - -import numpy as np -import matplotlib.pyplot as plt - -plt.ioff() -for i in range(3): - plt.plot(np.random.rand(10)) - plt.show() - -############################################################################### -# which makes three plots, one at a time. +# restriction is lifted, so one can write a script like this:: +# +# import numpy as np +# import matplotlib.pyplot as plt +# +# plt.ioff() +# for i in range(3): +# plt.plot(np.random.rand(10)) +# plt.show() +# +# which makes three plots, one at a time. I.e. the second plot will show up, +# once the first plot is closed. # # Summary # -------