You need to tell ggplot2 that the horizontal axis is a date variable.
Both of the following work; I read your data in as a data frame named
df with respective variables series and height, per your csv file.
(BTW, c is not an inspired choice of a data frame name since it is the
same as one of the most commonly used functions in the language.)
ggplot(df, aes(x = series, y = height)) + geom_point() + geom_line() +
scale_x_date()
qplot(series, height, data=df, geom=c("line","point")) + scale_x_date()
HTH,
Dennis
> --
> You received this message because you are subscribed to the ggplot2 mailing list.
> Please provide a reproducible example: http://gist.github.com/270442
>
> To post: email ggp...@googlegroups.com
> To unsubscribe: email ggplot2+u...@googlegroups.com
> More options: http://groups.google.com/group/ggplot2
>
df <- read.csv("heavy.csv", header = TRUE) as.Date(as.character(df$series), "%Y-%m-%d")
df$series <- as.Date(as.character(df$series), "%Y-%m-%d")
str(df) # verify that the class of series is Date rather than factor
Now plot.
HTH,
Dennis