0

I've built a faceted graph in ggplot2, each facet representing an organization with 3 distinct measures (Competence, Experience and Values). I got the following output so far which is great, but I need to go one step further:

qplot(Trust.Bucket, Trust.Average, data = mydata, geom="bar", fill=Firm, facets = . ~ Firm)
q <- qplot(Trust.Bucket, Trust.Average, data = mydata, geom="bar", fill=Firm, facets = . ~ Firm)
q + scale_y_continuous(limit = c(0, 5)) + opts(axis.text.x=theme_text(angle=-90))

It's basically filling all 3 bars (Competence, Experience and Values) from each facet/Organization with a distinct color. This is great, but what I need is to color each facet in the same way as above but using the brand colors of each organization indicated in the facets' headers (e.g. Amazon = "darkorange4", Apple = "grey49", Google = "springgreen3", etc). What do I miss from my code to achieve this result?

Thanks a lot in advance for helping. enter image description here

tonytonov
  • 25,060
  • 16
  • 82
  • 98
  • `opts` was deprecated quite a long time ago, what version of `ggplot` are you using? – tonytonov Feb 21 '14 at 07:20
  • Also, edit the question to add some of your data to make a [reproducible example](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). – tonytonov Feb 21 '14 at 07:28
  • possible duplicate of [Manually setting group colors for ggplot2](http://stackoverflow.com/questions/17180115/manually-setting-group-colors-for-ggplot2) – Jason Aller Feb 13 '15 at 18:34

0 Answers0