Hi,
I am currently trying to use multicategory axis in R. So far, I managed to use multicategory y axis on bar charts with the help of this post for the python api: Multicategory Axis Type Example?, where I have to set the axis type manually:
library(tidyverse)
library(plotly)
x = array(
c("BB+", "BB+", "BB+", "BB", "BB", "BB",
16, 17, 18, 16, 17, 18),
c(6, 2)
)
p <- plot_ly() %>%
add_bars(y=t(x),x=c(1,2,3,4,5,6)) %>%
add_bars(y=t(x),x=c(6,5,4,3,2,1)) %>%
layout(barmode="relative", yaxis = list(type = "multicategory"))
p
However, when I try to use the same approach for heatmaps, Rstudio freezes:
q <- plot_ly() %>%
add_heatmap(y=(x),x=c(1,2,3,4,5,6), z = 1) %>%
layout(yaxis = list(type = "multicategory"))
q
Any suggestions how I can achieve the same axis for heatmaps?