glue-viz / glue-plotly

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

Add exporter for dendrogram viewer #39

Closed Carifio24 closed 1 year ago

Carifio24 commented 1 year ago

This PR adds an exporter for the dendrogram viewer. While Plotly has a create_dendrogram figure factory, that factory seems to do the dendrogram computation as well. Since the glue viewer assumes that the dendrogram has already been created (i.e. via astrodendro), we instead can get something that matches the glue display by using the existing dendrogram data from glue and creating a line-only Scatter object. This is a similar approach to what we do with e.g. the histogram viewer, where we use the glue-computed histogram bars rather than Plotly's histogram functionality to match what we see in glue.