10000 Remove cairo-based backends from backend fallback. by anntzer · Pull Request #13189 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Remove cairo-based backends from backend fallback. #13189

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 1 commit into from
Jan 17, 2019
Merged
Show file tree
Hide file tree
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
7 changes: 5 additions & 2 deletions lib/matplotlib/pyplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,11 @@ def switch_backend(newbackend):
close("all")

if newbackend is rcsetup._auto_backend_sentinel:
for candidate in ["macosx", "qt5agg", "qt4agg", "gtk3agg", "gtk3cairo",
"tkagg", "wxagg", "agg", "cairo"]:
# Don't try to fallback on the cairo-based backends as they each have
# an additional dependency (pycairo) over the agg-based backend, and
# are of worse quality.
for candidate in ["macosx", "qt5agg", "qt4agg", "gtk3agg", "tkagg",
"wxagg", "agg"]:
try:
switch_backend(candidate)
except ImportError:
Expand Down
8722 5 changes: 3 additions & 2 deletions matplotlibrc.template
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@

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