I am trying to create a line plot (with symbols) and I am having trouble with the size of the symbols in the legend. No matter what I try to do, increasing the point size in the legend increases the LINE part of the legend symbol, which overwhelms the symbol itself. I tried taking out the line in the legend using geom_line(show.legend=F) , but that has no effect.
Here is my code:
fig3<-ggplot(data,aes(x=Time,y=Mean,ymin=LCI,ymax=UCI,group=Treatment)) + geom_line(aes(color=Treatment),show.legend=F)+ geom_point(aes(color=Treatment, shape=Treatment,size=3))+geom_errorbar(width=0.2,size=0.8,aes(col=Treatment))+labs(title=NULL,x="Nominal Time (hrs)",y=expression(paste(Delta,Delta,"QTcI ","(msec)",sep="")))+ scale_y_continuous(limits=c(-5,15))+geom_hline(yintercept=10,linetype=2,col="red")+ theme(axis.text.x=element_text(size=12),axis.text.y=element_text(size=12),axis.title=element_text(size=12),plot.title=element_text(size=20),legend.text=element_text(size=12),legend.title=element_text(size=12))+ guides(size=FALSE)+guides(color = guide_legend(override.aes = list(size = 4)))
You can see from the attached plot that the line overwhelms the symbols. I also tried
+guides(shape = guide_legend(override.aes = list(size = 4)))
but it again only seems to affect the line part of the legend symbols.
Any help at all would be greatly appreciated.