Row and coloumn names do not display on x and Y axis in heatmaply. Instead of row and colomn names it is showing digits.
data <- read.csv("/Users/apple/Documents/42_heatmap_new.csv", sep=",")
> rnames <- data[,1]
> mat_data <- data.matrix(data[,2:ncol(data)]) ## matrix started with second column
> heatmaply(mat_data, file="heatmaply_preformed.html", dendrogram = "none", plot_method= c("plotly"), margins = c(150,250,30,150), grid_gap = 0.1, show_grid = TRUE, xlab = "Antibiotics", ylab = "Clinical isolates", main="Heatmap for drug resistance profile of 42 complete genomes", cexCol = 0.9, cexRow = 1.0, lwid =c(4,1), lhei =c(2,2))
I added code markup to your post for increased readability. You can do this by selecting the text and clicking the 101010 button. When you compose or edit a post that button is in your toolbar, see image below:
code seems to have no problem. x and y axis (xlab and ylab) names are present in output as expected. I hope you have installed phantom js via R (install via
webshot::install_phantomjs()
). Then add following information to your code:file = c("heatmaply_plot.html", "heatmaply_plot.png")
. This should create a png file in working directory. If it has xlab and ylab, then your displaying window has issue.But my code do not display all the anitbiotic names at the x axis and isolates names at y axis instead it is showing numbers like 1, 2, 3 , 4 and so on. What to do.