I am trying to create a boxplot with ggplot and plotly with the dataset airquality
where Month
is on the x-axis and Ozone
values are o
I found solution on https://github.com/ropensci/plotly/issues/887
Try to make this kind of code !
library(plotly)
vals <- boxplot(airquality$Ozone,plot = FALSE)
y <- airquality[airquality$Ozone > vals$stats[5,1] | airquality$Ozone < vals$stats[1,1],]
plot_ly(airquality,y = ~Ozone,x = ~Month,type = "box") %>%
add_markers(data = y, text = y$Day)