So I have light treatment as a fixed variable on the x-axis and I would like to overlap feeding rate and median day of death on the y-axis. I would also be happy with something that looks like this
Here is my data
ggplot(data = df_median, aes(x = Median_death, y = Feeding_rate,
colour = factor(Light_treatment), group = factor(Light_treatment),
fill = after_scale(color)))+
beside = TRUE+
labs(x = "Light treatment",
y = "Feeding rate",
title = "Feeding rate across treatments",
color = 'Group') +
scale_color_manual(values = c("grey50", "red3", "blue2", "yellow2", "green3", "pink")) +
theme_bw()
This is what I have tried but it just ends up looking messy and not clear at all.