想求问一下3个问题:如何使坐标轴长度不超过刻度上限?实线和虚线中间断了是怎么回事?如何合并两个图例?
ggplot(data=test1,aes(x=year,y=val,col=sex,shape=predict,linetype=predict))+
theme_classic(base_family = "")+
theme(text=element_text(size=10,face = "bold", family="serif"))+
geom_point()+
geom_line()+
scale_shape_manual(values = c(16,1))+
scale_linetype_manual(values = c('solid', 'dotted')) +
labs(title='Global Age−standardized DALYs Rate of Cirrhosis due to NASH')+
theme(plot.title = element_text(hjust = 0.5)) +
scale_x_continuous(name="Year", breaks=seq(1990,2050,10),limits=c(1990, 2050)) +
scale_y_continuous(name="Age−standardized DALYs Rate
Per 100k Population", breaks=seq(30,60,10),limits=c(30, 60))+
theme(legend.title=element_blank())+
theme(legend.text = element_text(size = 8, face = "plain"))+
theme(legend.position = 'top')