1

I am pretty new to R, and I've tried plotting some simple time-series weather data.

I have daily data for 30 years starting in 1987. However, when I plot the graph, it is only showing the final years of my series. What can I do for it to show the full series?

Here is the code I've used:

 library(ggplot2)
 options(stringsAsFactors = FALSE)
 gamboa <- read.csv("D:/Gamboa.csv")
 gamboa$Date <- as.Date(gamboa$Date,
                              format = "%m/%d/%y")
 class(gamboa$Date)
 ggplot(data = gamboa, aes(x = Date, y = Tx2m)) +
    geom_point() +
    labs(x = "Date",
         y = "tmp max)",
         title = "tmp max Data",
         subtitle = "gamboa")

Graph only showing 2019 onwards

AnilGoyal
  • 25,297
  • 4
  • 27
  • 45
Adi
  • 191
  • 7
  • 2
    Hi Adi, welcome to StackOverflow! Without seeing your data, it is difficult to help you. Could you add your data to the question (using `dput()` for example)? See https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example. – Bas May 27 '21 at 13:33
  • 1
    Some things that could be wrong (without looking at your data): `Tx2m` is missing for dates before 2019, or the `Date` field is not in the `%m/%d/%y` format. – Bas May 27 '21 at 13:33

0 Answers0