libname blah "c:\blah"; options fmtsearch = (blah work); proc format library = blah; value $smoked "Non-smoker" = "None " missing = "Missing" other = "Not none" ; run; data fram; set sashelp.heart; smokin = put(smoking_Status, $smoked.); run; proc sgplot data = fram; scatter x = height y = weight; run; ods listing style = statistical; proc sgplot data = fram; scatter x = height y = weight; run; ods listing sge = on style = statistical; proc sgplot data = fram; scatter x = height y = weight; run; ods listing sge = on style = statistical; proc sgplot data = fram; reg x = height y = weight; run; ods listing sge = on style = statistical; proc sgplot data = fram; * specify the color of the markers and lines; reg x = height y = weight / MARKERATTRS = (color = green) lineattrs = (color = lime); run; ods listing sge = on style = statistical; proc sgplot data = fram; * specify the color and the style is like graphdata1 with color - lime; reg x = height y = weight / markerattrs = (color = green) lineattrs = graphdata1 (color = lime); run; ods listing sge = on style = statistical; proc sgplot data = fram; reg x = height y = weight / group = sex ; run; /**** search onlineDoc for -- sgplot reg color -- to see colors are set with contrastcolor for each graphData element; next searh onlinedoc for -- style graphdata -- to figure out how to set the symbol notice the section called "Changing the Default Markers and Lines"; also look at "Some Common Style Elements" ***/ * make a style templte called sexE to distinguish the two sexes; proc template; define style sexE; parent = styles.Statistical; style graphdata1 / contrastColor=pink markersymbol = "star"; style graphdata2 / contrastColor=blue markersymbol = "plus"; end; run; ods listing sge = on style = sexE; proc sgplot data = fram; scatter x = height y = weight / group = sex ; reg x = height y = weight / group = sex ; run;