fork download
  1. library(plotly)
  2.  
  3. vst4<-read.csv("https://g...content-available-to-author-only...o.gl/t8yWII",header = T)
  4.  
  5. my_palette <- colorRampPalette(c("red","yellow","green"))(n = 64)
  6.  
  7. xa <- list(
  8. title = "里程數",
  9. autotick = FALSE,
  10. ticks = "outside",
  11. tick0 = 0,
  12. dtick = 5,
  13. ticklen = 5,
  14. tickwidth = 2,
  15. tickcolor = toRGB("black"),
  16. autorange = "reversed"
  17. )
  18.  
  19. ya <- list(
  20. title = "時間",
  21. autorange = "reversed",
  22. autotick = FALSE,
  23. autorange=T,
  24. dtick=60
  25. )
  26.  
  27. plot_ly(x=vst4$milage,y=vst4$time_HM ,z = vst4$vdsAvgSpd, colors = my_palette , type = "heatmap")%>%
  28. layout(xaxis = xa,title="里程數")%>%
  29. layout(yaxis = ya,title="時間") %>%
  30. layout(title = "國五北上時空速率圖")
  31.  
Success #stdin #stdout #stderr 0.22s 60752KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Error in library(plotly) : there is no package called ‘plotly’
Execution halted