【发布时间】:2018-10-31 06:18:05
【问题描述】:
将 ggplot 转换为 plotyly 时出现此错误。 必须做什么?
我的代码:
p <- ggplot(data_, aes(data_$dates,group = 1)) +
geom_point(aes(y = data_$exp))+
geom_point(aes(y = data_$actual))+
geom_line(aes(y = data_$exp, color='Expected')) +
geom_line(aes(y = data_$actual, color='Actual'))+
geom_label(aes(y = data_$exp,label = data_$exp,hjust = 0,vjust = -0.2))+
geom_label(aes(y = data_$actual,label = data_$actual,hjust = 0,vjust = 0.2 ))+
labs(title = "Avail")+
labs(x="Dates")+
labs(y="")+
guides(color = guide_legend(title = ""))
output$trendPlot <- renderPlotly({
ggplotly(p)
})
我得到的错误:
geom_GeomLabel() has yet to be implemented in plotly.
If you'd like to see this geom implemented,
Please open an issue with your example code at
https://github.com/ropensci/plotly/issues
Warning in origRenderFunc() :
Ignoring explicitly provided widget ID "85055e160099"; Shiny doesn't use them
【问题讨论】:
标签: r dataframe ggplot2 plotly