vcs
vcs copied to clipboard
Closing a canvas does not work properly if more than one canvas is open.
The following script opens 4 canvases, plots the same fillarea and closes the canvases one at a time. The canvases get cleared but not closed. This does not work on Linux but works on Mac.
import vcs
import sys
import vtk
f=vcs.createfillarea()
f.x=[.2,.5,.8]
f.y=[.2,.8,.2]
f.color=["red"]
x=vcs.init()
x.plot(f)
y=vcs.init()
y.plot(f)
z=vcs.init()
z.plot(f)
w=vcs.init()
w.plot(f)
x.interact()
x.close()
y.interact()
y.close()
z.interact()
z.close()
w.interact()
w.close()
If we replace .interact() with .backend.interact() everything works fine.