Discussion:
[Matplotlib-users] matplotlib with eclipse: how to get a graph?
Mark Bakker
2009-09-22 09:53:23 UTC
Permalink
Hello list,
I recently started using Eclipse with Pydev. I like it a lot but have not
been able to get interactive plotting going (which otherwise works fine).

My file is simple:

from pylab import *

ion()

plot([1,2,3])


When I run this form within Eclipse, I do see a graphing window open up but
then it disappears again when it is done, before I can even look at it.

Any suggestions on how to keep the graphing window open?

Thanks,

Mark
Jouni K. Seppänen
2009-09-22 10:37:48 UTC
Permalink
Post by Mark Bakker
I recently started using Eclipse with Pydev. I like it a lot but have not
been able to get interactive plotting going (which otherwise works fine).
Does Pydev have any sort of specific support for matplotlib? I'm asking
because even in the normal Python shell interactive work can be
difficult, depending on the backend, and whatever command-loop magic
IPython does makes it work better. You could try different backends, but
I suspect that Pydev would have to have specific support for integrating
the backend-specific command loop for it to really work.
--
Jouni K. Seppänen
http://www.iki.fi/jks
Mark Bakker
2009-09-23 20:51:44 UTC
Permalink
Hello list,
I recently started using Eclipse with Pydev. I like it a lot but have not
been able to get interactive plotting going (which otherwise works fine).

My file is simple:

from pylab import *

ion()

plot([1,2,3])


When I run this form within Eclipse, I do see a graphing window open up but
then it disappears again when it is done, before I can even look at it.

Any suggestions on how to keep the graphing window open?

Thanks,

Mark
Gökhan Sever
2009-09-23 21:02:23 UTC
Permalink
Post by Mark Bakker
Hello list,
I recently started using Eclipse with Pydev. I like it a lot but have not
been able to get interactive plotting going (which otherwise works fine).
from pylab import *
ion()
plot([1,2,3])
You need to issue a show() here. Thus the plotting window will hang on the
screen until you close it.


Eclipse Platform
Version: 3.5.0
Build id: I20090611-1540

PyDev for Eclipse 1.5.0.1251989166
org.python.pydev.feature.feature.group
Post by Mark Bakker
When I run this form within Eclipse, I do see a graphing window open up but
then it disappears again when it is done, before I can even look at it.
Any suggestions on how to keep the graphing window open?
Thanks,
Mark
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
--
Gökhan
Mark Bakker
2009-09-24 09:46:54 UTC
Permalink
Excellent. Many thanks.After all those years of using matplotlib, I finally
find a use for show()
Mark
Post by Gökhan Sever
Post by Mark Bakker
Hello list,
I recently started using Eclipse with Pydev. I like it a lot but have not
been able to get interactive plotting going (which otherwise works fine).
from pylab import *
ion()
plot([1,2,3])
You need to issue a show() here. Thus the plotting window will hang on the
screen until you close it.
Eclipse Platform
Version: 3.5.0
Build id: I20090611-1540
PyDev for Eclipse 1.5.0.1251989166
org.python.pydev.feature.feature.group
Post by Mark Bakker
When I run this form within Eclipse, I do see a graphing window open up
but then it disappears again when it is done, before I can even look at it.
Any suggestions on how to keep the graphing window open?
Thanks,
Mark
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
--
Gökhan
Gökhan Sever
2009-09-24 13:31:24 UTC
Permalink
There is even a simpler use case :)

Just put those three lines in a file say test.py

and try python test.py

Unless you are in ipython -pylab or threading enabled, it is required to
issue a show() to see the results on the screen.
Post by Mark Bakker
Excellent. Many thanks.After all those years of using matplotlib, I
finally find a use for show()
Mark
Post by Gökhan Sever
Post by Mark Bakker
Hello list,
I recently started using Eclipse with Pydev. I like it a lot but have not
been able to get interactive plotting going (which otherwise works fine).
from pylab import *
ion()
plot([1,2,3])
You need to issue a show() here. Thus the plotting window will hang on the
screen until you close it.
Eclipse Platform
Version: 3.5.0
Build id: I20090611-1540
PyDev for Eclipse 1.5.0.1251989166
org.python.pydev.feature.feature.group
Post by Mark Bakker
When I run this form within Eclipse, I do see a graphing window open up
but then it disappears again when it is done, before I can even look at it.
Any suggestions on how to keep the graphing window open?
Thanks,
Mark
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
--
Gökhan
--
Gökhan
Loading...