Thanks for your efforts. My sgplot looks like the attached one. The corresponding code for this example is:
ods graphics on / labelmax=42100 antialiasmax=42100;
proc sgplot data=data1;
scatter x=Var1 y=Var2;
series x=Var1 y=Var3 / group=quantile legendlabel="Gew" name="G";
series x=Var1 y=Var4 / group=quantile legendlabel="OhneGew" name="OG";
keylegend "G" "OG" / location=inside position=topleft title="Quantile" titleattrs=(weight=bold) across=3;
run;
ods graphics off;
I want to plot the results of two quantile regressions. I a got grouped variable called "quantile" with the 5th, 50th and 95th percentiles. My aim is to label the two outcomes with "Gew" for the three percentiles of the first regression and with "OhneGew" for the three percentiles of the second regression. Therefore I used the keylegend statement along with the legendlabel statement. But as a result, I only get a legend without the description "Gew" and "OhneGew". With respect to the attached sgplot, I want to modify the given legend. The first row of the legend should begin with "Gew" and the second one with "OhneGew". Many thanks for your help!
... View more