[R] Contour plot with time on X-axis (day) and Y-axis (hours)

xbodin xavier.bodin at univ-savoie.fr
Fri Jan 7 14:15:00 CET 2011

Hello all,

I'd like to graphically represent an hourly temperature timeseries (
http://r.789695.n4.nabble.com/file/n3179098/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/n3179098/Timetemp.r Timetemp.r ) which
basically :
 - creates x-axis, a vector which will contain the days,
 - creates y-axis, a vector which will contain the hours of the day,
 - creates the z-matrix, which has x columns and y rows.

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 !


||| Pre-process of data.csv:

data <- na.omit(read.csv("data.csv", header = T, sep = ",", dec = "."))
data <- data[,-1]
data[[2]] <- strptime(data[[2]], "%m/%d/%y %I:%M:%S %p", tz =

View this message in context: http://r.789695.n4.nabble.com/Contour-plot-with-time-on-X-axis-day-and-Y-axis-hours-tp3179098p3179098.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list