Xavier Bodin
2011-Jan-13 12:54 UTC
[R] Contour plot with time on both X-axis (day) and on Y-axis (hours)
Hello all, I'd like to graphically represent an hourly temperature timeseries ( http://r.789695.n4.nabble.com/file/n3215785/data.csv data.csv , and see below for pre-process of the data) with the R functions image + contour. To do that I wrote that script : http://r.789695.n4.nabble.com/file/n3215785/Timetemp.r Timetemp.r , which basically : - creates the x-axis, a vector which will contain the days, - creates the y-axis, a vector which will contain the hours of the day, - creates the z-matrix, which has x columns and y rows, - plots the image+contour graph of the x-y-z dataset. This works fine, except that I have some troubles with the time format : I can't set a date (day/month/year) to the x-axis of the resulting graph. Does anyone knows where the pb is ? Thanks ! xav ||| Pre-process of data.csv: data <- na.omit(read.csv("data.csv", header = T, sep = ",", dec = ".")) data <- data[,-1] data[[1]] <- strptime(data[[1]], "%m/%d/%y %I:%M:%S %p", tz "America/Santiago") -- View this message in context: http://r.789695.n4.nabble.com/Contour-plot-with-time-on-both-X-axis-day-and-on-Y-axis-hours-tp3215785p3215785.html Sent from the R help mailing list archive at Nabble.com.