| 1 | PROC HPCANDISC DATA=sashelp.fish ncan=3 out=outcan; |
| 2 | ods exclude tstruc bstruc pstruc tcoef pcoef; |
| 3 | id Species; |
| 4 | class Species; |
| 5 | var Weight Length1 Length2 Length3 Height Width; |
| 6 | RUN; |
| 1 | PROC TEMPLATE; |
| 2 | define statgraph scatter; |
| 3 | begingraph; |
| 4 | entrytitle 'Fish Measurement Data'; |
| 5 | layout overlayequated / equatetype=fit |
| 6 | xaxisopts=(label='Canonical Variable 1') |
| 7 | yaxisopts=(label='Canonical Variable 2'); |
| 8 | scatterplot x=Can1 y=Can2 / group=species name='fish'; |
| 9 | layout gridded / autoalign=(topright); |
| 10 | discretelegend 'fish' / border=false opaque=false; |
| 11 | endlayout; |
| 12 | endlayout; |
| 13 | endgraph; |
| 14 | END; |
| 15 | RUN; |
| 1 | PROC SGRENDER DATA=outcan template=scatter; |
| 2 | RUN; |