Hello:
I have a point range plot of monthly precipitation for a river basin.
What is the easiest way to change the order of months such that they
are not alphabetical? Using ddply sorts them alphabetically. Either
I want to resort the dataframe or change the order which ggplot plots
the data. Thank you.
Here is my code:
ganges_subbasin_a2pre_sort <- ddply(ganges_subbasin_a2pre, .(Month,
CATCHMENT_), summarise, med = median(precip), min = min(precip), max =
max(precip))
p <- ggplot(ganges_subbasin_a2pre_sort ,aes(x = Month, y = med, ymin =
min, ymax = max, subset = CATCHMENT_ == "Yamuna08")) +
ylab("Precipitation (mm/day)\n") + opts(title = subbasin) +
scale_colour_grey()
p + geom_pointrange(linetype = 2, colour = "navyblue") +
opts(axis.text.x = theme_text(colour = "black")) + opts(axis.text.y =
theme_text(colour = "black")) + opts(axis.line = theme_segment(colour
= "black")) + opts(axis.ticks = theme_segment(colour = "white"))
--
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