FOCUS AREAS

Graphics

Comparative Plot
Comparative Plot
Base SAS: ODS Graphics Procedure: SGSCATTER

/* Open the LISTING destination and assign the LISTING style to the graph */ 
ods listing style=listing;
ods graphics / width=5in height=2.81in;
title 'Mileage by Horsepower and Weight';

/* Run PROC SGSCATTER on data SASHELP.CARS, selecting for sedans and sports cars */
proc sgscatter data=sashelp.cars(where=(type in ('Sedan' 'Sports')));
  label mpg_city='City';
  label mpg_highway='Highway';
  /* Compare city and highway mileage by vehicle horsepower and weight */
  compare x=(mpg_city mpg_highway) y=(horsepower weight) / 
     transparency=0.8 markerattrs=graphdata1(symbol=circlefilled);
run;