Hi Everyone,
I would like to know how can I use something like a do loop inside proc sgplot (or any other plotting command used in SAS). The purpose is to make multiple series inside one single plot without explicitly naming the series inside proc sgplot statement. I want the user to be able to add the series himself outside proc sgplot so that the proc sgplot automatically gives the combined plot instead of specifically mentioning the series.
Normally we use this type of statement to print multiple series in SAS:
proc sgplot data=test;
xaxis label= "x-axis";
yaxis label= "y-axis";
series x = x y=y1;
series x = x y=y2;
series x = x y=y3;
run;
I wish to have something like this:
%let y_list = y1 y2 y3;
proc sgplot data=test;
xaxis label= "x-axis";
yaxis label= "y-axis";
do for all values in y_list:
series x = x y= Step-by-step every element in y_list;
end;
run;