Not getting any answers to a weird problem.

PyPlot won't close the first figure it creates.  Subsequent figures can be 
created and closed.  gcf will not return a valid id for the first figure 
drawn.  plt[:get_fignums]() won't return a value for the first figure 
(e.g.--the first figure is not included in the returned vector of figures). 
 The only way to close the orphaned figure is to exit Julia.  Further if 
you click on the figure window and try to manually close it you will get an 
infinite spinning beach ball.  You can, however, switch back to Julia repl, 
which is happily running just fine.

This is part of a script that draws figures with interactive on and clears 
them with a user prompt. It is sort of annoying that the first one can 
never be closed.  The same symptom can be observed using Julia 
interactively:

using PyPlot
plot(1:5)  # -> figure draws fine in a tk window
close() # -> nothing happens
scatter(rand(25),rand(25)) # -> draws just fine
close() #-> closes the scatter as you'd expect and only the first figure 
remains
close() # -> nothing happens

You can explicitly create the first figure with figure() or figure(1) and 
the same problem occurs.

Environment:
    os x 10.11.1 ("el capitan")
    python 2.7.10 from www.python.org
    matplotlib 1.5.0 and dependencies (via pip)
    numpy 1.10.1 (via pip)
    Julia 0.4.0
    latest PyCall & PyPlot (with backend :tk)
    xquartz 2.7.8 (latest per "upgrade..." on about box)
    tk 8.5.18 (latest from ActiveState)

This does not occur when conda installs its own Python--same version, 
except built by Continuum, with equivalent versions of all Python packages 
 I don't consider just using conda an appropriate solution, as that seems 
to be avoiding finding an answer.  As of 2 weeks ago there was no problem 
so something (not clear what) changed in the mean time.  There is a path to 
this Python as: /Library/Frameworks/Python.framework/Versions/2.7/bin which 
is the first directory in PATH. (Note: this is NOT the system python which 
is at /system/library/...).  Also, I can't switch to Winston or Gadfly as I 
need surface plots and contour plots--PyPlot to matplotlib is the only way 
to create these from Julia that I am aware of.

When installing PyCall and PyPlot the comment output identifies this 
version of Python.

I am trying to sort out the figure logic in PyPlot.jl but it is hard for me 
to figure (no pun intended) it out.

Of course, I'll provide any and all additional information about my 
configuration, etc and can try other things to help diagnose this weird 
thing.

Thanks,
Lewis

Reply via email to