dash-bio
dash-bio copied to clipboard
Problem with the color_list functionality of dash.clustergram
Bug reported on community Forum in this post:
It appears that the color_list functionality of dash.clustergram is not working. The color dictionary is supposed to update the cluster trace colors, however, while the color_list dictionary can be defined, it is not used and only default colors are displayed.
This is also the case for the plotly gallery example (Clustergram | Dash for Python Documentation | Plotly 1) as minimal example:
import pandas as pd
from dash import dcc
import dash_bio as dashbio
df = pd.read_csv('https://git.io/clustergram_brain_cancer.csv').set_index('ID_REF')
columns = list(df.columns.values)
rows = list(df.index)
clustergram = dashbio.Clustergram(
data=df.loc[rows].values,
row_labels=rows,
column_labels=columns,
color_threshold={
'row': 250,
'col': 700
},
height=800,
width=700,
color_list={
'row': ['#636EFA', '#00CC96', '#19D3F3'],
'col': ['#AB63FA', '#EF553B'],
'bg': '#506784'
},
line_width=2
)
dcc.Graph(figure=clustergram)
clustergram
Plotly staff member, Emilie Burton, looked into it and confirmed this is a bug as well.