Arguments to set colors, shapes, line types, position…

The position argument for bars with 2 factors

Stacked bar charts

How to create a stacked bar chart where the bars represent values instead of means or medians?

When to use aes()?

So color=”pink” is never inside aes()?

No, values that do not depend on the data frame that you specify as input in the ggplot() function, like “pink” or “red”, are not put inside aes(). Simply put: if R doesn’t have to look up the value in this data frame, it shouldn’t go inside aes().