I want the lines and points on my line graph to both be the same colour, organised by cell type according to the figure legend. For cell types 'M' and the 'EPC's the lines aren't the correct colour, but the points are... where am I going wrong?!
This is my code:
myrYFP_18.7_ABA_2_reordered <- myrYFP_18.7_ABA_2
myrYFP_18.7_ABA_2_reordered$Cell.type <- factor(myrYFP_18.7_ABA_2_reordered$Cell.type,
levels = c("GC_1", "GC_2", "NC_1", "NC_2", "NC_3", "M",
"EPC_1", "EPC_2", "EPC_3"))
cbPalette <- c("#0033FF", "#0099FF", "#FFCC00", "#FF9900", "#FF6600", "#FF00FF", "#CCFF00",
"#66FF00", "#33CC33")
myrYFP_18.7_ABA_volume_change_plot <- ggplot(data=myrYFP_18.7_ABA_2_reordered, aes(x=Time,
y=Percentage.volume.change, group=Cell.ID)) +
geom_point(aes(colour=Cell.type)) +
geom_line(aes(colour=Cell.type)) +
scale_fill_discrete(name="Cell type") +
scale_colour_manual(values=cbPalette) +
ylim(-40, 20) + xlim(0,120)
And this is my line graph: