I have got a shiny application where I use the plotly package to convert my ggplot graph into dynamics graphics. I am at the moment facing a problem with this conversion.
Here is my data.frame :
b <- data.frame(ID_Miseq = c(rep("P1",8), rep("P2",8), rep("P3",8), rep("P4",8)),
Condition1 = c(rep("A", 8), rep("B",16), rep("C", 8)),
Taxon = c(rep(paste0("T",1:8),4)),
Percent = sample(seq(1,25,0.1),32))
When I am creating my static barplot, no problem.
library(ggplot2)
gg <- ggplot(b, aes(x = ID_Miseq, y = Percent, fill = Taxon))
gg <- gg + geom_bar(stat = "identity", position = "stack")
factors <- "~Condition1"
gg <- gg + facet_grid(factors, scales = "free", space = "free_x")
gg
But, when I am using the ggplotly function from the plotly package, one of the sample is turning into numeric scale.
library(plotly)
ggplotly(gg)
Does anyone have ever faced the same kind of issue ? Am I using the ggplotly function wrong ? I am using plotly 4.7.1