library(plotly)
dat1 <- data.frame(
sex = factor(c("Female","Female","Male","Male")),
time = factor(c("Lunch","Dinner","Lunch","Dinner"), levels=c("Lunch","Dinner")),
total_bill = c(13.53, 16.81, 16.24, 17.42)
)
p <- ggplot(data=dat1, aes(x=time, y=total_bill, group=sex,color=sex)) +
geom_line() +
geom_point()
ggplotly(p)
我想默认隐藏一行,以便用户可以随时单击它并使其在绘图本身上可见。我正在使用“renderPlotly”以闪亮的方式渲染上面的图。我在这里缺少任何选项吗?