Hi, I have this ggplot and I want paint one gender in grey color and the other one in white. This is my code:
library(tidyverse)
my_data <- tibble(Var_1 = c(900, 1500, 350, 1200, 750, 100,125,250,300),
Var_2 = c(385, 988, 150, 355,555, 900,20, 25, 500),
Gender = c("W", "W", "W", "M", "M", "W", "W", "M", "W"),
my_weights = c(2.2, 3.1, 8.2, 4.2, 5.3, 6.8, 12, 25, 1))
my_data %>%
ggplot(aes(Gender, Var_1, weight = my_weights, fill = Gender))+
geom_violin(color = "black", scale = "count")
And my figure here. The idea is to change the pink color for grey and the blue/green for white.