[R] ggplot rank stack bar automatically.
vd3000
vd3000 at yahoo.co.uk
Sat Feb 18 05:41:05 CET 2012
Hi, Ista,
1.
/"df.m <- transform(df.m, Period = reorder(Period, -1*value))
ggplot(df.m, aes(x = Period, y = value/1e+06, fill = Region)) +
geom_bar(stat = "identity", position = "stack") "/
I have followed your instruction but I found the sequence did not change.
2. I am looking for the stack value, I have read many threads and eventually
I think I should make a new frame and reorder it, after order it and put it
as a new level for df.m and let it identify the sequence...
I am still exploring how to intergrate it to the melt data df.m
Thanks...
--
View this message in context: http://r.789695.n4.nabble.com/ggplot-rank-stack-bar-automatically-tp4391042p4399172.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list