Closed GoogleCodeExporter closed 9 years ago
Just tried removing all imports except for scitools.std and this time the
script ran OK but the plot disappears very quickly.
Original comment by arefnamm...@gmail.com
on 19 Nov 2013 at 12:52
further testing indicated that importing matplotlib.pylab causes the behavior
first noted i.e. no plot being displayed.
Original comment by arefnamm...@gmail.com
on 19 Nov 2013 at 12:59
I cannot reproduce this. Can you try to leave out most of the import statments
and only import scitools? Like in the following script:
from scitools.std import *
def f(t):
return t**2*exp(-t**2)
t = linspace(0,3,31)
y = f(t)
plot(t, y)
show()
# This will keep the plot from disappearing
raw_input('press enter')
Original comment by johannes...@gmail.com
on 19 Nov 2013 at 1:02
When you do
from matplotlib.pylab import *
after
from scitools.std import *
you will end up with the plot command from matplotlib, not the one from
scitools.
Original comment by johannes...@gmail.com
on 19 Nov 2013 at 1:04
Thanks johannes. Yes keeping only scitools.std import * works but the plot does
not stay even with show(). The raw_input() does not work in the script--I get
EOF error, however, it works in the IDE.
If I remove the scitools.std import * statement and keep matplotlib the plot
stays with show() as expected.
Thanks for taking the time to respond.
Original comment by arefnamm...@gmail.com
on 19 Nov 2013 at 1:54
OK this is getting interesting. Running the code with show() from the command
line or using IDLE works fine. Using other editors such as Ninja or SciTE the
show() does not seem to work and raw_input() does not work--returns EOF error.
I suppose there is a compatibility issue with some editors.
Original comment by arefnamm...@gmail.com
on 19 Nov 2013 at 4:24
The show() command in scitools is not the same as the show() command in
matplotlib. It doesn't make the plot stay as in matplotlib, it just redraws the
current figure. You can use raw_input() or time.sleep() to make the plot stay.
If raw_input() doesn't work with your editor, then that is an issue with the
editor.
If you would like to use the matplotlib backend, then see "Controlling the
Backend" in the Easyviz documentation:
https://code.google.com/p/scitools/wiki/EasyvizDocumentation
I don't see that this is an issue with scitools, so I will mark this as invalid.
Original comment by johannes...@gmail.com
on 20 Nov 2013 at 10:42
Original issue reported on code.google.com by
arefnamm...@gmail.com
on 19 Nov 2013 at 12:36