9

matplotlib has a config file and IPython has its own. Which one has precedence when it comes to setting things like matplotlib backends?

For example, say my config file for matplotlib says to use a specific backend, but then I modify my IPython startup or config files to use a different one. Which one would be used when I start IPython and import matplotlib?

More generally, what is the right way to set things up so that different profiles use different matplotlib backends or matplotlib configurations?

2
  • Why not test it yourself? Set option=A in one file, set option=B in the other, start IPython and see which option is set? Commented Apr 15, 2014 at 16:59
  • 1
    tonysyu.github.io/mpltools at least gives you a nice way to separate config into several profiles. I would prefer to just call a method directly in your notebook Commented Jun 1, 2014 at 17:22

1 Answer 1

2

IPython configuration is used, as IPython itself chooses the matplotlib backend.

For reference, see IPython:core/pylabtools.py:activate_matplotlib and notice how matplotlib.use(backend) is called explicitly.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.