glue-viz / glue-plotly

Experimental plot.ly plugin for glue
BSD 3-Clause "New" or "Revised" License
2 stars 8 forks source link

Develop plot.ly HTML exporters for glue viewers #1

Closed astrofrog closed 1 year ago

astrofrog commented 5 years ago

In glue_plotly/html_exporters I have written a simple plot.ly exporter for 2D scatter plots as an example - this exporter can be used by clicking on the 'save' icon in scatter viewers and selecting 'Save Plotly HTML page':

Screenshot 2019-05-06 at 09 05 38

The code to do this is relatively simple - it relies on the viewer state (which represents the overall viewer options) and the list of layer state (viewer.state.layers) to construct a plotly figure, which is then exported to HTML.

This should now be extended to other viewer types in glue, including the histogram, profile, and (if possible) image viewers. The table in this section of the docs:

http://docs.glueviz.org/en/latest/python_guide/data_viewer_options.html#viewer-options

provides a list of the viewer classes and associated viewer state and layer state classes.

DumbMachine commented 5 years ago

Hey!! I would like to take up this issue. I will start a pull request if its free.

astrofrog commented 5 years ago

@DumbMachine - yes please feel free to open a pull request! I know that @catherinezucker has been working on the 2d and 3d scatter export, so best not to do those - could you try and implement the export for the histogram and profile viewers?

Carifio24 commented 1 year ago

I'm going to close this as we now have HTML exporters for all of the core glue viewers except the dendrogram viewer (which I guess is technically a plugin?), plus the vispy 3D scatter viewer.