获取q图的共享链接

时间:2019-11-19 03:24:04

标签: r ggplot2 rstudio-server ggplotly

library(dplyr)
Apartment_no <- c("1-SV","1-SV","1-SV","1-SH","1-SH","1-SH","1-1V","1-1V","1-1V","1-1H","1-1H","1-1H","3-SV","3-SV","3-SV","3-1V","3-1V","3-1V","3-1H","3-1H","3-1H")
month <- c("September","October","November","September","October","November","September","October","November","September","October","November","September","October","November","September","October","November","September","October","November")
Days <- c("2","19","28","2","19","28","2","19","28","2","19","28","25","31","28","12","13","24","8","26","19")
Heat_data <- data.frame(Apartment_no,month,Days)

我有以下数据,尽管它只是一个示例数据,因为原始数据包含大约163个Apartment_no和所有12个月的数据。由于这是一个大数据,因此我发现静态图将无济于事。因此,我使用以下代码绘制了一个交互式图。

q <-qplot(x=month,y=Days,data = Heat_clean,color = Apartment_no)
plot(q)
ggplotly(q)

当我尝试以下代码时,我想知道为上面的方法创建共享链接的方法,但是它返回了一个错误。

chart_link=api_create(p,filename = "Heatmeters-yearly-plot")
chart_links

第二,无论如何,我可以通过使用上面qplot代码中的if命令来突出显示或将图形上的天点(读数)标记为红色(如果它们低于10的地方)。

0 个答案:

没有答案