Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Matplotlib (no graph + no plot) window
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
sciencegentoo
n00b
n00b


Joined: 08 Feb 2014
Posts: 11

PostPosted: Fri Feb 28, 2014 6:36 pm    Post subject: Matplotlib (no graph + no plot) window Reply with quote

Hello,

I installed matplotlib through emerge and then tried to run a basic test

Code:

import matplotlib.pyplot as plt
plt.plot([1,2,3,4])
plt.ylabel('some numbers')
plt.show()


And nothing shows. No errors too. I tried changing the backend to others but they give errors asking pygtk, gobject etc. I installed those but the erros persist.

Substituting plt.show() with plt.savefig(`foo.png`) works.

Any suggestions?

Thanks in advance
Back to top
View user's profile Send private message
Naib
Watchman
Watchman


Joined: 21 May 2004
Posts: 6051
Location: Removed by Neddy

PostPosted: Fri Feb 28, 2014 9:31 pm    Post subject: Reply with quote

that code works for me.
What python version are you using?
_________________
Quote:
Removed by Chiitoo
Back to top
View user's profile Send private message
sciencegentoo
n00b
n00b


Joined: 08 Feb 2014
Posts: 11

PostPosted: Sat Mar 01, 2014 4:05 pm    Post subject: Reply with quote

Hey, Thanks for replying!
Thats my python version:

Python 3.3.3 (default, Feb 28 2014, 13:00:44)
[GCC 4.7.3] on linux
Back to top
View user's profile Send private message
Naib
Watchman
Watchman


Joined: 21 May 2004
Posts: 6051
Location: Removed by Neddy

PostPosted: Tue Mar 04, 2014 12:55 pm    Post subject: Reply with quote

ok thats odd, works4me (tm).
I know that does help you but...

are you running that from a script or from a python shell?
_________________
Quote:
Removed by Chiitoo
Back to top
View user's profile Send private message
sciencegentoo
n00b
n00b


Joined: 08 Feb 2014
Posts: 11

PostPosted: Sat Mar 22, 2014 4:28 pm    Post subject: Matplolib - no graph window Reply with quote

Hello,
I am working with matplotlib but when I call the show() function it doesn`t work, nor give errors.
It`s working if i save the graph to a file though. I tried changing the backend, but no success. Tried eselect for another python version, but still no luck. Any ideas?

Thanks in advance
Back to top
View user's profile Send private message
trendsetter37
n00b
n00b


Joined: 18 Mar 2014
Posts: 6
Location: United States

PostPosted: Tue Mar 25, 2014 12:26 pm    Post subject: which Python Reply with quote

Are you using the regular python shell, ipython, or the ipython notebook?
Back to top
View user's profile Send private message
TomWij
Retired Dev
Retired Dev


Joined: 04 Jul 2012
Posts: 1553

PostPosted: Tue Mar 25, 2014 7:31 pm    Post subject: Reply with quote

Can you provide us more details? (Which package? Which version? Which USE flags? How would we reproduce this?)
Back to top
View user's profile Send private message
Naib
Watchman
Watchman


Joined: 21 May 2004
Posts: 6051
Location: Removed by Neddy

PostPosted: Wed Mar 26, 2014 10:36 pm    Post subject: Reply with quote

Havnt you asked this before? I'm sure I responded and asked for info
_________________
Quote:
Removed by Chiitoo
Back to top
View user's profile Send private message
Naib
Watchman
Watchman


Joined: 21 May 2004
Posts: 6051
Location: Removed by Neddy

PostPosted: Wed Mar 26, 2014 10:40 pm    Post subject: Reply with quote

Any more info?
_________________
Quote:
Removed by Chiitoo
Back to top
View user's profile Send private message
aCOSwt
Bodhisattva
Bodhisattva


Joined: 19 Oct 2007
Posts: 2537
Location: Hilbert space

PostPosted: Sat Mar 29, 2014 6:56 pm    Post subject: Reply with quote

--Matplotlib no graph window + Matplotlib no plot window merged--
_________________
Back to top
View user's profile Send private message
neyuru
Apprentice
Apprentice


Joined: 21 Mar 2020
Posts: 191

PostPosted: Thu Apr 30, 2020 10:08 pm    Post subject: Reply with quote

If anyone lands on this old post like I did, try re-emerging matplotlib with support for a graphical front-end (USE flags gtk, gtk3, qt5,...). See this post
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum