Trying to migrate to Python 3.2, Matplotlib 1.2.1

Hi John,


2013/4/18 John Ladasky <john_ladasky@…209…>

On 04/18/2013 01:01 AM, Francesco Montesano wrote:

does plt.savefig(‘test.png’) work?

Yes, it does! Thank you, that was a useful hint.

Good, than I would say that is a clear sign that you have a non interactive backend.

Can you please give use the output of plt.get_backend() ?

If the figure get saved, it can be that you are using a non interactive backend

Ugh, the one thing that I never understood about Matplotlib was backends. So, what am I missing? (Whatever I am missing now, I had it working a year ago when I was using matplotlib 1.1.0 on Python 2.7.)

This link should explain you what a backend is.

If you want to use always a specific backend, you should select it in the matplotlibrc file

You should have a line like this

#backend : TkAgg

Just uncomment it and put the backend that you want to use

I have also just tried ipython3. Nothing that I do in the live interpreter displays any graphs.

That is not surprising: if matplotlib doesn’t use an interactive backend, you can’t show the figures, whatever interpreter you use.

I hope that now is clearer,


ps: try to remember to reply to the list :smiley: