我试图改变图例中两条线的颜色,以获得双向低地图。
我的代码如下:
twoway (lowess y x if z == 0) (lowess y x if z == 1), ///
title("Probabilistic Relationship between Incidence of Y and Diagnosis of X") ///
ytitle(Probability of Incidence of Y) ///
ylabel(0.0 0.05 0.10 0.15 0.20) ///
xtitle(Diagnosis of X) ///
legend(label(1 "Non-Z") label(2 "Current Z")) ///
rline(lcolor(1 "eltblue") (2 "eltgreen"), ///
lstyle(1 "solid") (2 "solid")) ///
note("Anonymous Project")
我不断在各种代码行上出错,特别是对于rline和lstyle。我应该使用哪些选项来编辑图中线条的颜色以及相应的图例? lcolor和rline选项不起作用。请指导我如何解决这个问题!