/****************************************************************************** * Programme : Erstellung von Streudiagramm-Matrizen mit PROC SGSCATTER * Reference : ERSTEL8AB3 * Source : https://www.wearecas.eu/en/sampleCode/ERSTEL8AB3 ******************************************************************************/ /* --- BLOC 1 --- */ ods listing gpath="/home/mySASData/resources_github/Graph/Correlation/img" image_dpi=200; ods graphics / reset = all attrpriority=color border = no width=800px height=800px imagename = "matrix1" imagefmt = png outputfmt = png antialiasmax = 10000; /* --- BLOC 2 --- */ proc sgscatter data=sashelp.cars(where=(type in ('Sedan' 'Sports'))); title 'Scatterplot Matrix for Vehicle Type'; label mpg_city='City'; label mpg_highway='Highway'; matrix mpg_city mpg_highway horsepower weight / transparency=0.5 markerattrs=(symbol=CircleFilled); run; /* --- BLOC 3 --- */ ods graphics / reset = all attrpriority=color border = no width=800px height=800px imagename = "matrix2" imagefmt = png outputfmt = png antialiasmax = 10000; /* --- BLOC 4 --- */ proc sgscatter data=sashelp.iris; title "Scatterplot Matrix for Iris Data"; matrix SepalLength SepalWidth PetalLength PetalWidth / group=Species transparency=0.5 markerattrs=(symbol=CircleFilled); run; /* --- BLOC 5 --- */ ods graphics / reset = all attrpriority=color border = no width=800px height=800px imagename = "matrix3" imagefmt = png outputfmt = png antialiasmax = 10000; /* --- BLOC 6 --- */ proc sgscatter data=sashelp.iris; title "Scatterplot Matrix for Iris Data"; compare x=(SepalLength SepalWidth) y=(PetalLength PetalWidth) / group=species markerattrs=(symbol=CircleFilled); run;