On Oct 27, 2010, at 5:17 AM, ashz wrote:
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?
Those X values are most likely not Date class but rather factors and
sorted alphabetically as is typically done at time of factor creation.
You probably need to work with factor levels. (All guesswork in the
absence of a reproducible example.)
--
David Winsemius, MD
West Hartford, CT
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.