I am trying to visualize data using ggplot2.
I have 3 facet figures with geombars in each
So, here each facet represents a particular variable that I have used in other graphs where ggplot2 assigns them to fill colors by default.
The faceted plots are black by default.
I can change the fill color for all three panels but haven't found how to change each panel's fill to a different color.
Here is a sample data and code to represent the basic idea:
df = data.frame(matrix(data=c(1,3,1,2,3,1,2,3,2,3,1,2,3,1,2,3,
ggplot(data = df,aes(factor(y),fill=factor(x))) +
ggplot(data = df, aes(factor(y))) +
How to match the color of each facet to fill its cover in "dodgebars"?