Home > Software engineering >  Display more than three variables using different aesthetics in a ggplot2 bar chart
Display more than three variables using different aesthetics in a ggplot2 bar chart

Time:09-24

Can the following chart be generated using ggplot2:

enter image description here

There are two variables mapped onto the axises, one variable (Region) mapped onto the colour (using grouped bars) and one variable (Product) mapped onto some other aethetics (alpha, pattern, line style)

How would that be possible? An example using R is welcome.

CodePudding user response:

Here is an approach by abusing facets to serve as an x-axis so you can both stack and "dodge" the data. You can look into the enter image description here

  • Related