[R] ggplot - unwanted sorted X values

ashz ashz at walla.co.il
Wed Oct 27 11:17:16 CEST 2010


Hi,

I have this script:

dat <- data.frame(X = halistat$Date,Y1 = halistat$avg,Y2 = halistat$stdev)
ggplot(data = dat, aes(x = X, y = Y1, ymin = Y1 - Y2, ymax = Y1 + Y2)) +
  geom_point() + # points at the means
  geom_line() + # if you want lines between pints
  geom_errorbar() # error bars, Y1 - Y2 and Y1 + Y2


halistat$Date values:
29/1/10
21/2/10
30/3/10
30/4/10
30/5/10


In the resulted plot the X values are sorted, how can I cancel it?

Thanks. 

-- 
View this message in context: http://r.789695.n4.nabble.com/ggplot-unwanted-sorted-X-values-tp3015099p3015099.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list