I am trying to plot the bar graphs where I have two groups and 3 variables for which I need to plot the bar graphs. My objective is to have same colour for all the three bars in a particular group.

I am posting the code below.

Any help is appreciated.

```
packages = c("tidyverse", "tidymodels", "reprex")
lapply(packages, library, character.only = TRUE)
var1 = c(1:20)
var2 = c(1:20)
var3 = c(1:20)
data1 = cbind(var1, var2, var3)
data1 = data1 %>%
as.data.frame()
group = NULL
group[1:10] = 1
group[11:20] = 2
data1 = data1 %>%
mutate(group = group)
#ggplot(data1, aes(x=factor(group), y=var1)) + stat_summary(fun.y="mean", geom="bar")
#ggplot(data1, aes(x= factor(group), y = var1)) + geom_col()
#ggplot(data1, aes(x = factor(group), y = var2)) + stat_summary(fun.y="mean", geom="bar")
#ggplot(data1, aes(x = factor(group))) + geom_bar(aes(y = var1), stat = "mean")
d = ggplot(data1, aes(factor(group)))
d + stat_summary_bin(aes(y = c(var1, var2)), fun.y = "mean", geom = "bar")
_Error: Aesthetics must be either length 1 or the same as the data (20): y_
```