下面是我的server.R代码
##########
output$trendPlot_2 <- renderPlotly({
p <- plot_ly(mygsv, x=mygsv$Hour, y=mygsv$GSV, color=mygsv$Orders,
mode = "markers"
)
##############输出图形上有点。如何在不丢失第三维(颜色)的情况下将它们转换为图形?
发布于 2015-09-08 07:05:41
您可以使用type = "bar"代替mode = "markers"
例如:plot_ly(x = cut, y = n, type = "bar", color = clarity, filename="r-docs/bar-color-map")结果为:

有关使用plotly和r绘制条形图的更多信息,请查看此教程页面:https://plot.ly/r/bar-charts/
https://stackoverflow.com/questions/32441811
复制相似问题