Dear ggplot users,
I want to ask that how to change the line type? That is to say, if I plot the two lines on one chart, but I want to have one in dashed line and one in solid line. The code below doesn't work. Thanks for your help.
p1=ggplot()+
geom_path(data=climateData, aes(x=date,y=temp,color='Temperature'))+
geom_path(data=climateData, aes(x=date,y=precip,color='Precipitation'))+
xlab('Day of Year 1960')+ylab('Daily climate parameters')+
scale_color_manual('',breaks=c('Temperature','Precipitation'),values=c('blue','red'))+
scale_linetype_manual(values=c('dashed','solid'))
show(p1)
climateData
date temp precip
1960-9-9 52 0.2
1960-9-10 52 0
1960-9-11 58 0
...