It seems that plotly
converts NA values from ggplot2
graphic with a null label. Here is a simple example.
library(ggplot2)
library(plotly)
col1 <- c("a","c","b","c",NA,"a","b","b",NA,NA)
df <- data.frame(col1)
MyPlot <- ggplot(data = df, aes(x = df$col1)) +
geom_bar(stat = "count")
print(MyPlot)
ggplotly(MyPlot)
Is there a function to override this behavior and keep the NA label ? Maybe with plotly_bluid
function who allow changes to the plot ?
You could relabel your ticks by using: