Overlaid plots can display data for more than one variable on one set of axes.
They can be created from separate columns in the same data set, columns in dif-ferent data sets, or both.
• Overlaying variables from the same data set on page 26 overlays data from separate columns in the same workbook.
• Overlaying variables from multiple data sets on page 28 overlays variables from different workbooks.
Note: It is also possible to create similar plots without using the overlay feature, if the data are stored in one column, by assigning a variable or parameter to the Group context.
Overlaying variables from the same data set
This example plots the summary statistics for concentration at each time interval.
Plot summary statistics for concentration at each time point:
1. Select the workflow in the Object Browser and then select Insert > Plotting >
XY Plot.
Note: The XY Plot object can also be added by right-clicking the workflow and selecting New > Plotting > XY Plot.
The XY Plot object is added to the workflow in the Object Browser. The new XY Plot object is called XY Plot 2.
2. Map the Descriptive Stats Statistics worksheet as the input source for the XY Plot 2 object:
• In the XY Plot 2 XY Data Mappings panel click the Select Source but-ton to open the Select Source dialog.
• Select the Descriptive Stats Statistics worksheet and click OK.
OR
• Select the workflow. The workflow Diagram tab is displayed in the right viewing panel.
Each operational object in a workflow is represented in the Diagram tab.
• Click the chevron buttons to expand the Descriptive Stats and XY Plot 2 symbols.
Each operational object in the Diagram tab contains a complete list of all input and output sources.
• Click the (+) symbol beside the Descriptive Stats Results.
• Click the (+) symbol beside the XY Plot 2 Inputs.
• Drag the Descriptive Stats Statistics worksheet to the XY Plot 2 XY Data input.
The Statistics worksheet is mapped to the XY Plot object. A line is dis-played that represents the mapping between the Descriptive Stats and XY Plot 2 objects.
3. Select the XY Plot 2 object in the Object Browser.
4. Use the option buttons in the XY Data Mappings panel to map the data types to the following contexts:
• Map Time to the X context.
• Map CI 95% Lower Mean to the Y context.
• Map CI 95% Upper Mean to the Y2 context.
• Leave all other data types mapped to None.
Set plot options:
The plot display options are located in the XY Plot 2's Options tab. Expand items in the Options menu tree by clicking the (+) signs.
1. Select Plot > Title. In the Title field type Overlay Charts. Press ENTER to move to the next line and type: Example 1.
2. Select Axes > Y. Select the Label tab. In the Label field type Confidence Interval.
3. Click the Execute button. The results are displayed on the Results tab.
Overlaying variables from multiple data sets
This example will plot the Observed and Predicted concentrations from a model fitting by using the output from Bg1.pmo.
Import the data sets and the PK model:
1. Select File > Import or click the Import button. The Open File(s) dialog is displayed.
2. Navigate to the Phoenix legacy WinNonlin examples subdirectory, which by default is located at C:\Program
Files\Pharsight\Phoe-nix\application\Examples\Legacy WinNonlin.
3. Select Bg1.pmo and click Open.
The Data Import Wizard is displayed. The wizard is used to assign options for how the data are imported and presented.
4. Click Finish. The data set is added to the project’s Data folder.
Note: PMO files can only be loaded on 32-bit operating systems or using the Phoenix32.exe on 64-bit operating systems.
A file in PMO (Pharsight Model Object) format is added to the Data folder as one or more workbook objects. A .pmo file also adds one or more operational objects to the workflow.
The Bg1.pmo file adds:
• A data set in workbook form (bg1).
• Dosing worksheet (Bg1_sources).
• A PK Model object named Bg1.
5. Click the (+) symbols beside bg1 and Bg1_sources in the Data folder to view the data sets’ worksheets.
Run the PK Model:
1. Select the PK Model object Bg1 in the Object Browser. The PK Model’s Setup tab is displayed in the right viewing panel.
CAUTION: Models saved in PMO format contain all the necessary data mappings and option settings. Do not change these settings.
2. Select items in the PK Model object’s Setup tab list to examine the model’s data mappings and option settings.
The imported PK Model object uses PK Model 3, which is a one compartment model with 1st order absorption.
3. Click the Execute button. The results are displayed on the Results tab.
There are now two data sets available: the source data set bg1 and the PK Model’s Summary Table results. Both data sets are used to create the overlay plot.
Add the first XY Plot plot:
1. Select the workflow in the Object Browser and then select Insert > Plotting >
XY Plot.
The XY Plot object is added to the workflow in the Object Browser.
2. Map the data set bg1 as the input source for the XY Plot 3 object:
• Use the pointer to drag the bg1 Sheet1 worksheet from the Data folder to the XY Data Mappings panel.
OR
• In the XY Plot 3 XY Data Mappings panel click the Select source but-ton to open the Select Object dialog.
• Select the bg1 Sheet1 worksheet and click Select.
The bg1 data set is mapped to the XY Plot 3 object.
3. Use the option buttons in the XY Data Mappings panel to map the data types to the following contexts:
• Leave Subject mapped to None.
• Map Time to the X context.
• Map Conc to the Y context.
Add the second XY Plot plot:
1. Select Plot in the Options tab menu tree. Select the Graphs tab.
2. Click the Add button. A second XY plot is added to the XY Plot 3 object.
Graphs tab
A second XY Plot input named XY 1 Data is added to the Setup list.
3. Map the PK Model Summary Table worksheet as the input source for the second XY Plot:
• In the XY Plot 3 XY 1 Data Mappings panel click the Select Source button to open the Select Object dialog.
• Select the Bg1 Summary Table worksheet and click Select.
OR
• Select the workflow. The workflow Diagram tab is displayed in the right viewing panel.
Each operational object in a workflow is represented in the Diagram tab.
• Click the chevron buttons to expand the Bg1 and XY Plot 3 symbols.
Each operational object in the Diagram tab contains a complete list of all input and output sources.
• Click the (+) symbol beside the Bg1 Results.
• Click the (+) symbol beside the XY Plot 3 Inputs.
• Drag the Bg1 Summary Table worksheet to the XY Plot 3 XY 1 Data input.
The Summary Table worksheet is mapped to the second XY Plot. A line is displayed that represents the mapping between the Bg1 and XY Plot 3 objects.
4. Use the option buttons in the XY 1 Data Mappings panel to map the data types to the following contexts:
• Map Time to the X context.
• Map Predicted to the Y context.
• Leave all other data types mapped to None.
Note: To delete a plot, select Plot in the Options menu tree and select the Graphs tab. Select the plot to be deleted and click Remove.
Set graph options:
The graph display options are located in the XY Plot's Options tab. Expand items in the Options menu tree by clicking the (+) signs.
1. Select Plot > Title. In the Title field type: Overlay Charts 2. Press ENTER to move to the next line and type: Example using two data sets.
2. Select Graphs > Conc vs Time. Select the Appearance tab.
3. In the Appearance tab, use the Marker Color menu to change the marker color to red.
4. Click the Execute button. Both XY Plot graphs are displayed together in the Results tab.
Note: It is not necessary to keep a project open after completing each chapter. This project is not required when working in the next chapter. To close a project