R/heatmap_plotly.R

Defines functions heatmap_plotly

heatmap_plotly <- function(X,
                           ...){
  # plot_ly sorts axis labels alphabetically unless they're.
  # Causes problems when trying to add numeric labels to each cell
  requireNamespace("viridis")
  plotly::plot_ly(x = colnames(X),
                  y = rownames(X),
                  z = X,
                  type = "heatmap",
                  colors=viridis::magma(n=256),
                  ...)
}
neurogenomics/EpiCompare documentation built on Oct. 18, 2024, 11:04 p.m.