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

Skip to content

Discourage omitting backend in matplotlibrc #8518

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
Apr 20, 2017
Merged

Discourage omitting backend in matplotlibrc #8518

merged 1 commit into from
Apr 20, 2017

Conversation

Rufflewind
Copy link
Contributor

PR Summary

Remind users who want to customize their matplotlibrc to set the backend, or else unexpected behavior can occur as matplotlib defaults to a non-interactive backend.

PR Checklist

  • (n/a) Has Pytest style unit tests
  • (n/a) Code is PEP 8 compliant
  • (n/a) New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • (n/a) Added an entry to doc/users/whats_new.rst if major new feature
  • (n/a) Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

This can lead to unexpected behavior as matplotlib defaults to a
non-interactive backend.
@@ -35,6 +35,9 @@
# You can also deploy your own backend outside of matplotlib by
# referring to the module name (which must be in the PYTHONPATH) as
# 'module://my_backend'.
#
# If you omit this parameter, it will always default to "Agg", which is a
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not think this is not quite true, the value of $TEMPLATE_BACKEND is set at build time based on what it finds. Some of the wheels we have released do in fact default to Agg (because they are built in very clean environments).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is what I observed on my particular installation:

  • No user config file: Qt5Agg (the same backend listed in data/matplotlibrc.
  • With user config file but backend is not set in that file: Agg. Naively I would have expected Qt5Agg too but it seems that is not the case. This is what prompted this PR.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, yes, you are right 🐑

@phobson phobson merged commit c3a440d into matplotlib:master Apr 20, 2017
@QuLogic
Copy link
Member

QuLogic commented Apr 21, 2017

The AppVeyor failure here is not spurious; this change broke it because the patch for building conda packages no longer applies to the template file.

@phobson
Copy link
Member

phobson commented Apr 21, 2017

Oh shoot. Sorry. I missed that :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants