Advertisement
Guest User

Untitled

a guest
Apr 22nd, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.02 KB | None | 0 0
  1. oct5 = read.delim("051015.txt", header=TRUE)
  2. oct6 = read.delim("061015.txt", header=TRUE)
  3. oct7 = read.delim("071015.txt", header=TRUE)
  4. oct8 = read.delim("081015.txt", header=TRUE)
  5. oct9 = read.delim("091015.txt", header=TRUE)
  6.  
  7. install.packages("ggplot2")
  8. library(ggplot2)
  9.  
  10. install.packages("lubridate")
  11. library(lubridate)
  12.  
  13. SolcelleData <- function() {
  14.  
  15. oct5plot <- ggplot() +
  16. geom_line(aes(y = Kipp.Zonen, x = DateAndTime, color = 'Kipp.Zonen'), data = oct5_9) +
  17. geom_line(aes(y = SolData, x = DateAndTime, color = 'SolData'), data = oct5_9) +
  18. scale_x_datetime()
  19.  
  20. oct5plot + labs(title = "Soldata oct5-9", x = "Time of day", y = "Soldata")
  21.  
  22. }
  23.  
  24. SolcelleData()
  25.  
  26. oct5$DateAndTime <- dmy_hms(oct5$DateAndTime)
  27. oct6$DateAndTime <- dmy_hms(oct6$DateAndTime)
  28. oct7$DateAndTime <- dmy_hms(oct7$DateAndTime)
  29. oct8$DateAndTime <- dmy_hms(oct8$DateAndTime)
  30. oct9$DateAndTime <- dmy_hms(oct9$DateAndTime)
  31.  
  32. oct5_9 = rbind(oct5, oct6, oct7, oct8, oct9)
  33.  
  34. PmaxData <- function() {
  35.  
  36. Pday <- oct5;
  37.  
  38. PmaxPlot <- ggplot() +
  39. geom_point(aes(y = Pmax.a.Si, x = DateAndTime, color = 'Pmax.a.Si'), data = Pday) +
  40. geom_point(aes(y = Pmax.459, x = DateAndTime, color = 'Pmax.459'), data = Pday) +
  41. geom_point(aes(y = Pmax.CIS, x = DateAndTime, color = 'Pmax.CIS'), data = Pday) +
  42. geom_point(aes(y = Pmax.NESTE, x = DateAndTime, color = 'Pmax.NESTE'), data = Pday) +
  43. geom_point(aes(y = Pmax.433, x = DateAndTime, color = 'Pmax.433'), data = Pday) +
  44. geom_point(aes(y = Pmax.422, x = DateAndTime, color = 'Pmax.422'), data = Pday) +
  45. geom_point(aes(y = Pmax.A10160, x = DateAndTime, color = 'Pmax.A10160'), data = Pday) +
  46. geom_point(aes(y = Pmax.A10156, x = DateAndTime, color = 'Pmax.A10156'), data = Pday) +
  47. geom_point(aes(y = Pmax.423, x = DateAndTime, color = 'Pmax.423'), data = Pday) +
  48. geom_point(aes(y = Pmax.GPV, x = DateAndTime, color = 'Pmax.GPV'), data = Pday) +
  49. scale_x_datetime()
  50.  
  51. PmaxPlot + labs(title = "Pmax", x = "Time of day", y = "W")
  52.  
  53. }
  54.  
  55. PmaxData()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement