input( '\nControl returned to terminal shell:\nwindow is now unresponsive (press Enter)' ) vp1.closeWindow() # window should now close, the Plotter instance becomes unusable # but mesh objects still exist in it: print("First Plotter actors:", vp1.actors) vp1.show() #THIS HAS NO EFFECT: window does not exist anymore. Cannot reopen. ################################################################## # Can now create a brand new Plotter and show the old object in it vp2 = Plotter(title='Second Plotter instance', pos=(500, 0)) vp2.show(vp1.actors[0].color('red')) ################################################################## # Create a third new Plotter and then close the second vp3 = Plotter(title='Third Plotter instance') vp2.closeWindow() print('vp2.closeWindow() called') vp3.show(Hyperboloid()) from vtkplotter import closeWindow closeWindow() # automatically find and close the current window print('done.')
def close(self): vplt.closeWindow()