Hi,
I have the following code from the PCA:
proc sgplot data=princomp;
scatter x=Prin1 y=Prin2/group=cluster ;
xaxis label='Principal component 1';
yaxis label='Principal component 2';
run;
I get the graph that has red and blue empty circles for each cluster. Is there a way I can make them a little bit bigger and/or filled in so that the two clusters can be more easily differentiated when looking at the figure?
Thanks so much!
You can add the MARKERATTRS to override the default size and symbol used by the scatter plot
This would make the size of the marker 10mm, you can specify other units of measure such as CM, IN (inches), PCT (percent of area), PT (printers point like font sizes 72 dots per inch) or PX (pixels). The symbol overrides the default symbol to use a filled circle. The documentation has other choices.
proc sgplot data=princomp; scatter x=Prin1 y=Prin2/group=cluster markerattrs=(size=10mm symbol=circlefilled) ; xaxis label='Principal component 1'; yaxis label='Principal component 2'; run;
There are about 30 symbols, square/ squarefilled, star/ starfilled, triangle/trianglefilled, triangleleft/triangleleftfilled, triangleright/trianglerightfilled, diamond/diamondfilled and homedown/homedownfilled are the "hollow" and "filled" pairs.
If you want to branch into much more control then look up either DATTRMAP data sets or custom ODS Styles.
You can add the MARKERATTRS to override the default size and symbol used by the scatter plot
This would make the size of the marker 10mm, you can specify other units of measure such as CM, IN (inches), PCT (percent of area), PT (printers point like font sizes 72 dots per inch) or PX (pixels). The symbol overrides the default symbol to use a filled circle. The documentation has other choices.
proc sgplot data=princomp; scatter x=Prin1 y=Prin2/group=cluster markerattrs=(size=10mm symbol=circlefilled) ; xaxis label='Principal component 1'; yaxis label='Principal component 2'; run;
There are about 30 symbols, square/ squarefilled, star/ starfilled, triangle/trianglefilled, triangleleft/triangleleftfilled, triangleright/trianglerightfilled, diamond/diamondfilled and homedown/homedownfilled are the "hollow" and "filled" pairs.
If you want to branch into much more control then look up either DATTRMAP data sets or custom ODS Styles.
Perfect, thank you!!
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: