Closed astrofrog closed 11 months ago
@astrofrog This is a great point, and one that I've actually been thinking about lately. While #40 was originally just some experimentation, I came to the same conclusion re: making as much of the functionality as possible depend only on state. You can see my efforts there - I've try to mark functions that still rely on the Qt (really matplotlib) functionality by adding _from_mpl
to the function name. The histogram and scatter viewers in that PR are basically functional, so maybe that should be merged in for the refactoring.
To start, though, I can update the imports like has been done in other places.
While working on https://github.com/glue-viz/glue/pull/2431 I noticed that glue-plotly relies a fair bit on the Qt functionality in the current version of glue-core. However, while it makes sense to add buttons etc to the Qt viewers when available, we should probably make sure that the Qt-related functionality is optional, and that the part that will convert a glue viewer state to a plotly plot can be also used in Jupyter for instance.
Anyway, this is mainly a heads-up that glue-plotly will break once https://github.com/glue-viz/glue/pull/2431 is merged and that the Qt imports will need to be updated to use glue-qt, but if possible we should make those imports optional and ensure that the core functionality will work with just glue-core installed.