After a graph has been
created, you can change the data assignment for one or more plots
in the graph. You also change the data assignment for one or more
plots when you open a graph from the Graph Gallery. (Placeholder data
is assigned to plots for the graphs in the gallery.)
You assign data in the
Assign Data dialog box. The fields on this dialog box
vary by plot. The following display shows the
Assign Data dialog box for a scatter plot.
Example Assign Data Dialog Box for Scatter Plot Data
Depending on how you
opened the graph, the
Assign Data dialog
box appears as follows:
-
If you open a graph that you have
already created, then you must open the dialog box manually (as described
in the following procedure).
-
The dialog box appears automatically
when you open a graph from the Graph Gallery.
Exception: The
Assign Data dialog box does not open if you select a
multi-cell graph from the gallery. After opening a multi-cell graph,
to customize the data for the various plots in the graph, you must
open the
Assign Data dialog box for each
cell individually.
To change the data
assignment for a plot:
-
Open the
Assign Data dialog box if it is not already open. To
open the dialog box, right-click inside the graph cell that contains
the plot whose data you want to modify, and select
Assign
Data.
The
Assign
Data dialog box appears.
Note: Alternatively, right-click
directly on the plot and select
Assign Data. This action opens the
Assign Data dialog
box with the plot already selected.
-
If you want to change
the SAS library and data set, select the appropriate items from the
Library and
Data Set list boxes.
After you change the
library or data set, the plot labels might appear red. This color
indicates that required variables do not exist in the new data set,
and that you must assign variables for the plots. When you assign
variables for any of these plots, the plot name changes to black.
-
Make sure that the
Plot list box displays the plot that you want to modify.
If necessary, select a different plot from the list box.
-
In the
Variables section, assign a data variable to each plot role that is listed.
(Some roles might be optional.) To assign a variable, select the variable
from the list box next to the role's label.
For more information
about the roles, see Summary of Plot Roles and Data Attributes.
If the
More
Variables button is available, then you can click this
button to assign variables to additional plot roles. In the scatter
plot example, this option enables you to set error upper and error
lower limits.
-
If the
Fit
an existing plot check box is available, select the check
box to match the variables of the plot to those of another plot. This
check box is available only for specific plot overlays, such as a
Loess plot over a scatter plot or a normal plot over a histogram.
If you select the check
box, make sure that the plot that you want to fit appears in the
Plot list box.
The following display
shows the
Assign Data dialog box for a normal
density plot that is overlaid on a histogram.
In the example, the
check box is selected. This setting indicates that the X role of the
normal plot is matched to that of the histogram. Accordingly, the
X list box is dimmed. If you clear the
Fit
an existing plot check box, then you must assign a variable
to the X role.
-
(Optional) If you want
a more descriptive name for the plot, enter the name in the
Name text box. This name identifies the plot in the
Assign Data dialog box, in the
Cell Properties dialog box, in the
Legend Contents dialog
box, and in other places within the application.
By default, the designer
uses generic names for each plot. It is good practice to assign a
descriptive name that indicates a response variable or some identifying
characteristic of the plot.
-
(Optional) Specify use
of a secondary axis for the X axis, the Y axis, or both X and Y axes.
The secondary axis is a duplicate of the X or Y axis, and is displayed
on the opposite side of the cell area from the primary axis.
Note: You cannot specify a secondary
axis if the graph is a classification panel.
-
If the
Advanced
Options button is available, you can click this button
to specify additional options.
Advanced options typically
involve computational settings. For example, for plots that have confidence
limits, this feature enables you to set the alpha value, the degree,
and the interpolation.
-
If the graph contains
another plot whose variables you want to change, select the plot
from the
Plot list box. Then change the variables
for the plot.
-
If you want to create
a classification panel, click the
Panel Variables tab and select one or more classification variables.
For instructions, see Creating a Classification Panel.
The
Panel
Variables tab is not available for multi-cell graphs
(graphs that have more than one column or row).