subsequent figures close immediately
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| matplotlib (Ubuntu) |
Low
|
Unassigned |
Bug Description
Run something like this
#!/usr/bin/python
import pylab
for i in range(1,3):
X = [1,2]
Y = [i,2]
pylab.plot(X,Y)
pylab.show()
It should show a figure. When you close its window, a second figure will be plotted in a new window.
In intrepid: the second window closes immediately.
Should happen (happens on other platforms): the second window stays open.
Benjamin Drung (bdrung) wrote : | #2 |
With GTKAgg backend it works correct, but with TkAgg backend the second window closes immediately. matplotlib 0.98.5.2-1ubuntu2 is still affected.
Changed in matplotlib: | |
status: | New → Confirmed |
Benjamin Drung (bdrung) wrote : | #3 |
matplotlib 0.98.5.3-1ubuntu1 is still affected.
Changed in matplotlib (Ubuntu): | |
importance: | Undecided → Low |
status: | Confirmed → Triaged |
Jens (jens.timmerman) wrote : | #4 |
I'm still having this bug in ubuntu natty beta...
jens@morpheus:~$ apt-cache policy python-matplotlib
python-matplotlib:
Installed: 0.99.3-1ubuntu2
Candidate: 0.99.3-1ubuntu2
Version table:
*** 0.99.3-1ubuntu2 0
500 http://
100 /var/lib/
Jens (jens.timmerman) wrote : | #5 |
workaround with gtkagg does work
using
import matplotlib
matplotlib.
import matplotlib.pyplot as pylab
instead of import pylab makes it work
WeatherGod (ben-v-root) wrote : | #6 |
Don't import matplotlib.pyplot as pylab. This will only serve to cause confusion as the pylab interface is different from the pyplot interface. You should only need to do the first two lines (and they should be before any other matplotlib imports).
In addition, because Natty *should* come with matplotlib v1.0.1 (fingers crossed), this bug should become irrelevant as the problem in TkAgg has long since been fixed.
Changed in matplotlib (Ubuntu): | |
status: | Triaged → Fix Released |
Thanks Julian!
On 17 Nov 2012, at 13:51, Julian Taylor <email address hidden> wrote:
> ** Changed in: matplotlib (Ubuntu)
> Status: Triaged => Fix Released
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https:/
>
> Title:
> subsequent figures close immediately
>
> To manage notifications about this bug go to:
> https:/
On Sun, Jan 4, 2009 at 21:41, Matt H <email address hidden> wrote:
> Public bug reported:
>
> Run something like this
>
> #!/usr/bin/python
> import pylab
>
> for i in range(1,3):
> X = [1,2]
> Y = [i,2]
> pylab.plot(X,Y)
> pylab.show()
>
> It should show a figure.
if you want a single figure with 2 plots in it, then move pylab.show()
out ot for loop.
> When you close its window, a second figure will
> be plotted in a new window.
This is because pylab.show() displays the first image (the one with
diagonal line) and wait for you to close the popped-up window. Once
done, the loop goes into the second (and last) iteration, and show the
second plot in a different picture.
HTH, matrixhasu. altervista. org/ wiki.debian. org/SandroTosi
--
Sandro Tosi (aka morph, Morpheus, matrixhasu)
My website: http://
Me at Debian: http://