@@ -345,11 +345,10 @@ def my_plotter(ax, data1, data2, param_dict):
345
345
# :func:`matplotlib.use`::
346
346
#
347
347
# import matplotlib
348
- # matplotlib.use('PS') # generate postscript output by default
348
+ # matplotlib.use('qt5agg')
349
349
#
350
- # If you use the `~matplotlib.use` function, this should be done before
351
- # importing :mod:`matplotlib.pyplot`. Calling `~matplotlib.use` after pyplot
352
- # has been imported may fail to switch the backend and raise an ImportError.
350
+ # This should be done before any figure is created; otherwise Matplotlib may
351
+ # fail to switch the backend and raise an ImportError.
353
352
#
354
353
# Using `~matplotlib.use` will require changes in your code if users want to
355
354
# use a different backend. Therefore, you should avoid explicitly calling
@@ -359,12 +358,13 @@ def my_plotter(ax, data1, data2, param_dict):
359
358
# The builtin backends
360
359
# --------------------
361
360
#
362
- # With a typical installation of matplotlib, such as from a
363
- # binary installer or a linux distribution package, a good default
364
- # backend will already be set, allowing both interactive work and
365
- # plotting from scripts, with output to the screen and/or to
366
- # a file, so at least initially you will not need to use any of the
367
- # methods given above.
361
+ # By default, Matplotlib should automatically select a default backend which
362
+ # allows both interactive work and plotting from scripts, with output to the
363
+ # screen and/or to a file, so at least initially you will not need to worry
364
+ # about the backend. The most common exception is if your Python distribution
365
+ # comes without :mod:`tkinter` and you have no other GUI toolkit installed;
366
+ # this happens on certain Linux distributions, where you need to install a
367
+ # Linux package named ``python-tk`` (or similar).
368
368
#
369
369
# If, however, you want to write graphical user interfaces, or a web
370
370
# application server (:ref:`howto-webapp`), or need a better
0 commit comments