Closed klarh closed 4 years ago
As with matplotlib’s pyplot.gcf(), I think a public method for getting a scene via the imperative API would be useful. A related challenge that I face a lot: I wish it was easier to fetch a specific primitive from a scene and adjust its attributes (specifically colors). E.g. I make a scene of some spheres and a box, and I want to color the spheres according to different analysis methods. Implementing __getitem__
on the scene object would be one method of doing this. With the PR I made for garnett, this would be especially helpful: https://github.com/glotzerlab/garnett/pull/120
This proposed API makes quick visualizations more streamlined by automatically keeping track of primitive objects and displaying them. It can be used automatically (much like matplotlib figures get automatically displayed for each jupyter cell) in jupyter notebooks, or more manually controlled by
imp.show()
. I'm interested in hearing whether other users are interested in this API!