Previous Page | Next Page

The SGDESIGN Procedure

Example 2: Create a Graph That Uses a Different Data Set


Procedure features: subset data, ODS output

You can produce a graph from a different data set as long as the new data set has variables of the same name and type. The following example creates a new data set with the same variables as the original data set. This example assumes the existence of a graph named CarsLattice.sgd that was created based on the SASHELP.CARS data set.

data sedans;
   set sashelp.cars;
   where type="Sedan";
run;

ods html file="CarsLattice.html";
proc sgdesign sgd="CarsLattice.sgd" data=sedans; 
run;
ods html close;

Note:   If the SGD file was created using shared variables, then you can create a graph from a different data set regardless of the name of the variables. For more information, see Dynamic Variable Concepts.  [cautionend]

Previous Page | Next Page | Top of Page