Skip to content

Rectified plot error #12501

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Oct 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
24 changes: 12 additions & 12 deletions tutorials/introductory/usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
# -------
Expand Down