/***************************************************************************************************************** SAS file name: line_plot.sas File location: __________________________________________________________________________________________________________________ Purpose: To demonstrate how to create a line plot in SAS with PROC SGPLOT Author: Peter Clemmensen Creation Date: 07/03/2018 This program supports the example page "Line Plot with PROC SGPLOT in SAS" on SASnrd.com *****************************************************************************************************************/ /* Draw Simple Line Plot with PROC SGPLOT */ title "Simple Line Plot With PROC SGPLOT"; proc sgplot data=sashelp.stocks; where stock in ('IBM', 'Microsoft'); series x=date y=close / group=stock; run; title; /* A few modifications */ title "Line Plot With Modifications In PROC SGPLOT"; proc sgplot data=sashelp.stocks noborder; where stock in ('IBM', 'Microsoft'); styleattrs datacontrastcolors=(red green); series x=date y=close / curvelabel curvelabelattrs=(size=12) group=stock lineattrs=(thickness=3); keylegend / location=inside position=NE across=1; xaxis display=(nolabel noline noticks); yaxis display=(noline); run; title;