10000 Python version specific matplotlibrc · Issue #10376 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Python version specific matplotlibrc #10376

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

Closed
rmccampbell opened this issue Feb 4, 2018 · 5 comments
Closed

Python version specific matplotlibrc #10376

rmccampbell opened this issue Feb 4, 2018 · 5 comments
Labels
Difficulty: Hard https://matplotlib.org/devdocs/devel/contribute.html#good-first-issues New feature topic: rcparams

Comments

@rmccampbell
Copy link

Bug report

Bug summary

There should be a way to use different config files for different python versions, or at least specify different backends for different versions. I have PyQt5 installed for python3, so I prefer to set my backend to Qt5Agg. But occasionally I want to run something in python2 for testing or compatibility purposes. I don't want to waste time and space installing PyQt5 on python2, so I want the backend to stay TkAgg. A workaround is to change the config files in the matplotlib installation, but these will be overwritten on the next install.

@QuLogic
Copy link
Member
QuLogic commented Feb 4, 2018

You could use the MPLBACKEND environment variable to do that, e.g., if you're using bash, then alias pympl2='MPLBACKEND=TkAgg python2' could work.

@rmccampbell
Copy link
Author

I'm on windows (I could accomplish the same with a bash script) but I would much rather avoid using aliases if possible. By the time I remember I forgot to use the alias I might as well just call mpl.use('TkAgg').

@tacaswell tacaswell added this to the v3.0 milestone Feb 4, 2018
@tacaswell tacaswell added topic: rcparams New feature Difficulty: Hard https://matplotlib.org/devdocs/devel/contribute.html#good-first-issues labels Feb 4, 2018
@tacaswell
Copy link
Member

This would fit with in @anntzer 's advocacy to have the configuration just be a python script.

With our current system this would be a pretty big jump in complexity.

@anntzer
Copy link
Contributor
anntzer commented Feb 5, 2018
  1. Backend switching #9795 would also solve (in another manner) the OP's problem.
  2. You can put a matplotlibrc in the site-packages folder (which is different for each Python version) although it's a bit of a hack (see docs).
  3. As mentioned by Tom, pure Python mplrcs would also make this trivial.

@dstansby dstansby modified the milestones: v3.0, needs sorting Jul 26, 2018
@timhoffm
Copy link
Member

The original use-case has become obsolete due to dropping of Python 2 support. Please reopen if this is still a desirable feature.

@story645 story645 removed this from the future releases milestone Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty: Hard https://matplotlib.org/devdocs/devel/contribute.html#good-first-issues New feature topic: rcparams
Projects
None yet
Development

No branches or pull requests

7 participants
0