SAS Sgplot

Purpose: change marker and line attributes.

source code: http://support.sas.com/documentation/cdl/en/grstatproc/67909/HTML/default/viewer.htm#n1jkqnmk6y6ms9n1b2vvubyzqd4a.htm#n0drw4zpeqxun6n1szhz24ebw0qx

Shortcoming: work on 9.4 but not the previous versions.

data myclass;
set sashelp.class;
run;
proc sgplot data=myclass;
series x=name y=weight /markers markerattrs = (size=10pt)
group=sex;
run;

9-13-2016-2-29-08-pm

/* Create the data set.  */
data myclass;
set sashelp.class;
length type $10;
if age > 12 then type=’Teen’;
else type=’Pre-Teen’;
label type=”Age Group”;
run;
/* Create the attribute map. */
data mymap;
retain id “mytest”;
input value $ markersymbol $;
datalines;
Pre-Teen triangle
Teen square
;
run;
proc sgplot data=myclass dattrmap=mymap;
series x=name y=weight / markers
markerattrs=(size=10pt)
group=sex name=”a”
groupms=type msattrid=mytest;
keylegend “a” / type=markersymbol;
keylegend “a” / type=linecolor;
run;