@Soerendip wrote:
I am following this example:
I have a side-dendrogram and a heatmap. Though now the y-tick labels are gone. I am trying to add them, but it does not work. Is it possible to add those again?
heatmap = go.Heatmap(z=df.values, x=df.columns, y=df.index, colorscale = colorscale)
fig = go.Figure()
for i in range(len(dendro_side['data'])): dendro_side['data'][i]['xaxis'] = 'x2' for data in dendro_side['data']: fig.add_trace(data) y_labels = heatmap['y'] heatmap['y'] = dendro_side['layout']['yaxis']['tickvals'] fig.add_trace(heatmap) fig.update_layout({'height':800, 'showlegend':False, 'hovermode': 'closest'}) fig.update_layout( title={'text': title}, yaxis={'title': '', 'tickmode': 'array', 'automargin': True}) # X-axis of heatmap fig.update_layout(xaxis={'domain': [.11, 1], 'mirror': False, 'showgrid': False, 'showline': False, 'zeroline': False, 'showticklabels': True, 'ticks':"" }) # Y-axis of heatmap fig.update_layout(yaxis={'domain': [0, 1], 'mirror': False, 'showgrid': False, 'showline': False, 'zeroline': False, 'showticklabels': True, 'tickmode': 'array', 'ticktext': y_labels, 'side': 'right' }) # X-axis of side-dendrogram fig.update_layout(xaxis2={'domain': [0, .1], 'mirror': False, 'showgrid': True, 'showline': False, 'zeroline': False, 'showticklabels': False, 'ticks':"" }) # Y-axis of side-dendrogram fig.update_layout(yaxis2={'domain': [0, 1], 'mirror': False, 'showgrid': False, 'showline': False, 'zeroline': False, 'showticklabels': True, 'tickmode': 'array', 'ticktext': y_labels }) fig.update_layout({'paper_bgcolor': 'white', 'plot_bgcolor': 'white'})
Posts: 1
Participants: 1