Hi,
I am making a graph like below, where I am manually specifying colors (for lines) and fills (for points). It was working before, but then I made some change that made me lose the colors in the legend. Can you see what mistake I made and how to fix?
Thanks!
Stefanie Trop
ggplot(filter(forggplot), aes(reorder(cytokine, percent_res), percent_res, group = cytokine, label = percent_res))+
geom_line(aes(color = responseType))+
geom_point(aes(shape = MSD, fill = responseType), size = 6)+
scale_shape_manual(values = c(21, 22))+
scale_color_manual(values = c('#1b9e77', '#d95f02', '#7570b3', '#66a61e'),
labels = c('antiinflam', 'Th1', 'Th2', 'Th17'),
name = 'Category')+
scale_fill_manual(values = c('#1b9e77', '#d95f02', '#7570b3', '#66a61e'),
labels = c('antiinflam', 'Th1', 'Th2', 'Th17'),
name = 'Category')+
coord_flip()+
theme_bw()+
geom_text(color = 'white', size = 2, face = 'bold')+
labs(x = 'Cytokine',
y = '% responders',
title = paste('Percent responders'))+
theme(axis.text = element_text(face = 'bold'))