Advertisement
Guest User

Untitled

a guest
Jul 17th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. p4 <- ggplot(upper.ws.df, aes(elapsed.sec, WindDir)) +
  2. geom_point(colour = "tan", size = 0.25) +
  3. stat_smooth(aes(color = '8'), size = 0.5, method = lm,
  4. formula = y ~ splines::bs(x, 8), se = FALSE ) +
  5. # more code
  6. puwdir.smoothed <- ggplotly(p4)
  7.  
  8. axz <- list(title = 'Direction',
  9. ticketmode = 'array',
  10. ticktext = c('E', 'NE', 'N'),
  11. tickvals = c(0, 2*pi/8, 2*pi/4) )
  12. # Create the plot
  13. p3d.scatter <- plot_ly(upper.ws.df,
  14. x = ~elapsed.sec, y = ~WindSpeed, z = ~WindDir,
  15. type = "scatter3d", mode = 'markers',
  16. marker = list(size = 0.6, color= ~elapsed.sec,
  17. colorscale = list(c(0,'#BA52ED'), c(1,'#FCB040')))
  18. ) %>%,
  19.  
  20. layout(
  21. scene = list(
  22. xaxis = list(title = 'Elapsed Time (s)'),
  23. yaxis = list(title = 'Speed (m/s'),
  24. zaxis = axz)
  25. )
  26.  
  27. p3d.scatter
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement