[R] help with ggplot backgrounds
RanRL
rnrlrn at gmail.com
Sat Oct 29 00:03:12 CEST 2011
Hi, I have two questions regarding plotting of this dataset:
Product Color StoreA StoreB StoreC Price
A Red 4 2 3 78
Blue 5 2 2 78
Greem 4 3 2 80
B Red 3 ................
And so on (Not all products have same colors).
I made 2 plots: one is a scatter where x=Price and y=Values (of different
stores). The different stores are facet_wrapped, and Color is indicated by
point color while Product by point_shape.
Second plot is a polar plot of geom_bars with position="dodge" for all
Products to differentiate the colors. The y value is the value for each
store (Price is not represented).
My questions:
1. for the first plot, I want to make a background area split into 3, top
right is red (indicating high-price/high-values), middle is yellow, the rest
is green (these are kind of reverse-log areas, like in heat maps).
2. for the second plot, the red-yellow green are just background geom_rects
filled in, but I cant figure out how to specify the xmin and xmax for this
(since they are discrete variables).
Any help will be appreciated, thanks.
--
View this message in context: http://r.789695.n4.nabble.com/help-with-ggplot-backgrounds-tp3949320p3949320.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list