Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Update Usage FAQ to reflect new behaviour #8897

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 3 commits into from
Aug 10, 2017
Merged
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
19 changes: 8 additions & 11 deletions tutorials/introductory/usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,24 +542,21 @@ def my_plotter(ax, data1, data2, param_dict):
# plt.title("interactive test")
# plt.xlabel("index")
#
# and you will see the plot being updated after each line. This is
# because you are in interactive mode *and* you are using pyplot
# functions. Now try an alternative method of modifying the
# plot. Get a reference to the :class:`~matplotlib.axes.Axes` instance, and
# call a method of that instance::
# and you will see the plot being updated after each line. Since version 1.5,
# modifying the plot by other means *should* also automatically
# update the display on most backends. Get a reference to the :class:`~matplotlib.axes.Axes` instance,
# and call a method of that instance::
#
# ax = plt.gca()
# ax.plot([3.1, 2.2])
#
# Nothing changed, because the Axes methods do not include an
# automatic call to :func:`~matplotlib.pyplot.draw_if_interactive`;
# that call is added by the pyplot functions. If you are using
# methods, then when you want to update the plot on the screen,
# you need to call :func:`~matplotlib.pyplot.draw`::
# If you are using certain backends (like `macosx`), or an older version
# of matplotlib, you may not see the new line added to the plot immediately.
# In this case, you need to explicitly call :func:`~matplotlib.pyplot.draw`
# in order to update the plot::
#
# plt.draw()
#
# Now you should see the new line added to the plot.
#
# Non-interactive example
# -----------------------
Expand Down