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

Skip to content

Commit f53be2f

Browse files
authored
Merge pull request matplotlib#8897 from vab9/patch-1
DOC: Update Usage FAQ to reflect new behavior
2 parents a8ddde9 + 4f8bdca commit f53be2f

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

tutorials/introductory/usage.py

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -542,24 +542,21 @@ def my_plotter(ax, data1, data2, param_dict):
542542
# plt.title("interactive test")
543543
# plt.xlabel("index")
544544
#
545-
# and you will see the plot being updated after each line. This is
546-
# because you are in interactive mode *and* you are using pyplot
547-
# functions. Now try an alternative method of modifying the
548-
# plot. Get a reference to the :class:`~matplotlib.axes.Axes` instance, and
549-
# call a method of that instance::
545+
# and you will see the plot being updated after each line. Since version 1.5,
546+
# modifying the plot by other means *should* also automatically
547+
# update the display on most backends. Get a reference to the :class:`~matplotlib.axes.Axes` instance,
548+
# and call a method of that instance::
550549
#
551550
# ax = plt.gca()
552551
# ax.plot([3.1, 2.2])
553552
#
554-
# Nothing changed, because the Axes methods do not include an
555-
# automatic call to :func:`~matplotlib.pyplot.draw_if_interactive`;
556-
# that call is added by the pyplot functions. If you are using
557-
# methods, then when you want to update the plot on the screen,
558-
# you need to call :func:`~matplotlib.pyplot.draw`::
553+
# If you are using certain backends (like `macosx`), or an older version
554+
# of matplotlib, you may not see the new line added to the plot immediately.
555+
# In this case, you need to explicitly call :func:`~matplotlib.pyplot.draw`
556+
# in order to update the plot::
559557
#
560558
# plt.draw()
561559
#
562-
# Now you should see the new line added to the plot.
563560
#
564561
# Non-interactive example
565562
# -----------------------

0 commit comments

Comments
 (0)