8000 Remove cairo-based backends from backend fallback. · matplotlib/matplotlib@928aa76 · GitHub
[go: up one dir, main page]

Skip to content

Commit 928aa76

Browse files
committed
Remove cairo-based backends from backend fallback.
They would never be selected by the fallback machinery anyways.
1 parent a552780 commit 928aa76

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

lib/matplotlib/pyplot.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,11 @@ def switch_backend(newbackend):
190190
close("all")
191191

192192
if newbackend is rcsetup._auto_backend_sentinel:
193-
for candidate in ["macosx", "qt5agg", "qt4agg", "gtk3agg", "gtk3cairo",
194-
"tkagg", "wxagg", "agg", "cairo"]:
193+
# Don't try to fallback on the cairo-based backends as they each have
194+
# an additional dependency (pycairo) over the agg-based backend, and
195+
# are of worse quality.
196+
for candidate in ["macosx", "qt5agg", "qt4agg", "gtk3agg", "tkagg",
197+
"wxagg", "agg"]:
195198
try:
196199
switch_backend(candidate)
197200
except ImportError:

matplotlibrc.template

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@
3131

3232
## The default backend. If you omit this parameter, the first
3333
## working backend from the following list is used:
34-
## MacOSX Qt5Agg Qt4Agg Gtk3Agg GTK3Cairo TkAgg WxAgg Agg Cairo
34+
## MacOSX Qt5Agg Qt4Agg Gtk3Agg TkAgg WxAgg Agg
3535
##
36-
## Other choices include: WX PS PDF SVG Template.
36+
## Other choices include:
37+
## Qt5Cairo Qt5Cairo GTK3Cairo TkCairo WxCairo Cairo Wx PS PDF SVG Template.
3738
##
3839
## You can also deploy your own backend outside of matplotlib by
3940
## referring to the module name (which must be in the PYTHONPATH) as

0 commit comments

Comments
 (0)
0