glotzerlab / plato

Efficient visualization of particle data supporting several rendering engines.
https://plato-draw.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
12 stars 4 forks source link

Show vispy.app.run() command #10

Closed bdice closed 5 years ago

bdice commented 5 years ago

The vispy.app.run() command is needed to launch a window for the vispy application. I'm not 100% sure if this should go here or someplace else.

klarh commented 5 years ago

Would it make more sense to do something like adding an argument to show, similar to matplotlib's pyplot.show(block=True), that calls vispy.app.run() at the end? It's a little complicated because it's specific to a (vispy) backend of a (plato) backend...

bdice commented 5 years ago

@klarh It's also possible to launch the fresnel backend interactively in a similar way, if/when we add support. I find the keyword block a bit confusing for this case, though I see why matplotlib uses that word. I think an argument to show() is appropriate, however.

There are usually a few use cases possible for backends:

Being able to choose which of these occurs (for supporting backends) in some kind of sensible way would resolve both this issue and #9.