Go to advanced search

by raspidiot
Wed Dec 06, 2017 12:00 pm
Forum: Python
Topic: [SOLVED] Python3 and Matplotlib - no luck
Replies: 12
Views: 6457

Re: Python3 and Matplotlib - no luck

Just to let you know - i succeeded this way (and very quick, as expected):

I downloaded an older image (jessie) + installed matplotlib from the right package: sudo apt-get install python3-matplotlib

now it works fine.
by raspidiot
Wed Dec 06, 2017 9:08 am
Forum: Python
Topic: [SOLVED] Python3 and Matplotlib - no luck
Replies: 12
Views: 6457

Re: Python3 and Matplotlib - no luck

Thanks anyway! maybe i tried a version that was "too new" and i should go back to the jessie version of raspbian.

For tools like python3 and matplotlib, that are very frequently used, i would not expect that i have to install something else than matplotlib itself - should i?
by raspidiot
Tue Dec 05, 2017 9:56 am
Forum: Python
Topic: [SOLVED] Python3 and Matplotlib - no luck
Replies: 12
Views: 6457

Re: Python3 and Matplotlib - no luck

... If you are still having trouble, I suggest you try the default backend. matplotlib.rcdefaults() will restore all the standard settings. still no luck: >>> matplotlib.rcdefaults() >>> matplotlib.get_backend() 'agg' >>> plt.plot([1, 2, 3], [2, 4, 6]) [<matplotlib.lines.Line2D object at 0xb2259ed0...
by raspidiot
Tue Dec 05, 2017 9:52 am
Forum: Python
Topic: [SOLVED] Python3 and Matplotlib - no luck
Replies: 12
Views: 6457

Re: Python3 and Matplotlib - no luck

I decided to see if I had problems using the cairo backend of matplotlib on python3 in jessie; it seems OK after two packages are installed: sudo apt install python3-cairo sudo apt install libcairo2 There are a few references on stackexchange referring to a need for sudo apt install python3-gi but ...
by raspidiot
Tue Dec 05, 2017 9:38 am
Forum: Python
Topic: [SOLVED] Python3 and Matplotlib - no luck
Replies: 12
Views: 6457

Re: Python3 and Matplotlib - no luck

Is your matplotlib installation configured to use the cairo backend? ok i did what you recommanded and it shows up that my config is in /usr/local/lib/python3.5/dist-packages/matplotlib/mpl-data/matplotlibrc the line is backend : gtk3agg so seems not fitting. Will try now the next advice..
by raspidiot
Tue Dec 05, 2017 8:04 am
Forum: Python
Topic: [SOLVED] Python3 and Matplotlib - no luck
Replies: 12
Views: 6457

Re: Python3 and Matplotlib - no luck

robbes wrote:
Tue Dec 05, 2017 7:02 am
...
If you are still having trouble, I suggest you try the default backend.

Code: Select all

matplotlib.rcdefaults()
will restore all the standard settings.
Ok i will try also this after the tests from the post before. Thanks!
by raspidiot
Tue Dec 05, 2017 8:02 am
Forum: Python
Topic: [SOLVED] Python3 and Matplotlib - no luck
Replies: 12
Views: 6457

Re: Python3 and Matplotlib - no luck

Is your matplotlib installation configured to use the cairo backend? This will be stated in your matplotlibrc file. I think the location is normally in ~/.config/matplotlib/matplotlibrc. If not you can find it with >>> import matplotlib >>> matplotlib.matplotlib_fname() Look for a line that looks l...
by raspidiot
Mon Dec 04, 2017 2:54 pm
Forum: Python
Topic: [SOLVED] Python3 and Matplotlib - no luck
Replies: 12
Views: 6457

[SOLVED] Python3 and Matplotlib - no luck

Dear all, I ma new to Raspberry and i successfully set up a model B with Raspbian 4 weeks ago (downloaded raspbian and put it on an SD card) The System boots up fine and i can use it - So far so good. Now i try to start a python3 program that i developed on an Ubuntu PC. I was glad to see that Pytho...

Go to advanced search