I have developed a boxplot using the following sample code:
a<- ggplot(na.omit(df1), aes(x=C,
color=as.factor(complete))) + geom_boxplot()
a + ggtitle("Sample Text") +
ylab("E") + scale_fill_discrete(name = "
Response", labels = c("No", "Yes")) + theme(plot.title =
element_text(face = "bold", hjust=0.5)) + geom_point(position =
position_jitterdodge()) + scale_fill_manual(values = rep(NA, 2))
This results in a sample graph that displays datapoints exactly as I want but results in the legend getting distorted. Is there a way to alter the code to have the legend title as "Response" with "Yes" and 'No" as the legend items?