Entering edit mode
6.4 years ago
bandanaschapagain
▴
40
Hi, I a beginner with R and I am trying to plot an interactive heatmap using plot_ly. Here is my code
plot_ly(x=colnames(data),y=rownames(data),z=data,type="heatmap")
The problem is the legends or the rownames are not shown completely. I followed the code from R-graph gallery and also found rowname not shown complete. Here is the link from R graph gallery where the row names are not shown completely. https://www.r-graph-gallery.com/215-interactive-heatmap-with-plotly/
I followed how to set the size of cell of heatmap.2 in R link and try the text, height and width options.
plot_ly(x=colnames(data),y=rownames(data),z=data,type="heatmap",lhei=c(1,8),lwid = c(1,4),cexRow=1,cexCol=1,margins=c(5,20))
It would be great help if anyone could help me out. Thank you.
Those parameters are not supported by plotly.
I searched for plotly but no luck with that.
try this:
Thank you very much, it worked!