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

Skip to content

Commit aaacd25

Browse files
committed
Remove qt4 backends from backend fallback candidates.
This avoids triggering a deprecation warning whenever backend fallback occurs, even if the fallback mechanism was not going to select qt4foo.
1 parent 28f41f9 commit aaacd25

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

lib/matplotlib/pyplot.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,7 @@ def switch_backend(newbackend):
234234
# Don't try to fallback on the cairo-based backends as they each have
235235
# an additional dependency (pycairo) over the agg-based backend, and
236236
# are of worse quality.
237-
for candidate in [
238-
"macosx", "qt5agg", "qt4agg", "gtk3agg", "tkagg", "wxagg"]:
237+
for candidate in ["macosx", "qt5agg", "gtk3agg", "tkagg", "wxagg"]:
239238
try:
240239
switch_backend(candidate)
241240
except ImportError:

matplotlibrc.template

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,10 @@
6565
## ***************************************************************************
6666
## The default backend. If you omit this parameter, the first working
6767
## backend from the following list is used:
68-
## MacOSX Qt5Agg Qt4Agg Gtk3Agg TkAgg WxAgg Agg
68+
## MacOSX Qt5Agg Gtk3Agg TkAgg WxAgg Agg
6969
## Other choices include:
70-
## Qt5Cairo Qt4Cairo GTK3Cairo TkCairo WxCairo Cairo Wx
70+
## Qt5Cairo GTK3Cairo TkCairo WxCairo Cairo
71+
## Qt4Agg Qt4Cairo Wx # deprecated.
7172
## PS PDF SVG Template
7273
## You can also deploy your own backend outside of matplotlib by referring to
7374
## the module name (which must be in the PYTHONPATH) as 'module://my_backend'.

0 commit comments

Comments
 (0)