• No results found

Error bar plots

bars on XY plots.

» Overlay multiple plots on page 25 plots multiple variables per plot.

Error bar plots

This example uses summary statistics and error bars to create two XY plots:

» Plot the mean +/- standard deviation using relative error bars on page 21.

» Plot the median, minimum and maximum using absolute error bars on page 23.

Set up the data

Create a new project:

1. Select File > New Project to create a new project. A new project is created in the Object Browser.

2. Name the new project Plots.

Import the data set:

1. Select File > Import or click the Import button. The Open File(s) dialog is displayed.

2. Navigate to the Phoenix examples subdirectory, which by default is located at C:\Program

Files\Pharsight\Phoenix\applica-tion\Examples.

3. Select Bguide2.dat and click Open.

The Worksheet Import Options dialog is displayed. The dialog 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.

5. View the data set by selecting it in the Data folder. The worksheet is dis-played in the Grid tab, which is located in the right viewing panel.

Note: To view the worksheet in its own window, select the worksheet and double-click or press ENTER. The data set is displayed in a worksheet window.

Use the Units Builder to add units to a column:

Units must be added to the time and concentration columns before the data set can be used to create plots.

1. Select Bguide2 in the Data folder. The worksheet is displayed in the Grid tab.

The Columns tab is located underneath the Grid tab. The Columns tab is used to edit columns in a worksheet.

2. Select the Time column header in the Columns box.

3. Click the Unit Builder button. The Units Builder dialog is displayed.

4. Select hour [hr] in the Time menu.

5. Click the Add button beside the Time menu.

After clicking the Add button the selected units are displayed in the New Units field.

Note: Units can also be typed directly into the New Units field.

6. Click OK to assign the units to the column.

7. Select the Conc column header in the Columns box.

8. Click the Unit Builder button.

9. Select nano [n] in the Mass prefix menu.

10.Select gram [g] in the Mass unit menu.

11.Click the Add button beside the Mass menus.

12.Click the / operator button in the Add operator area.

13.Select milli [m] in the Volume prefix menu.

14.Select liter [L] in the Volume unit menu.

15.Click the Add button beside the Volume menus. Click OK.

Note: Units added to ASCII data sets can be preserved when the data sets are exported to disk or a database. Phoenix adds the units to a row beneath the column headers. When importing a .dat or .csv file with units, select the Has units row check box in the File Options area in the Worksheet Import Options dialog.

16.If the Bguide2 worksheet is opened in its own window, close the window.

Return to the window at any time by selecting the Bguide2 worksheet in the Data folder and double-clicking or pressing ENTER.

Descriptive statistics

To create error data for the error bars, this example computes means and stan-dard deviations for the concentration data at each time point.

Compute summary statistics:

1. Select the workflow object in the Object Browser and then select Insert >

NCA and Toolbox > Descriptive Stats.

Note: The Descriptive Stats object can also be added by right-clicking the workflow and selecting New > NCA and Toolbox > Descriptive Stats. Any object can be added by selecting New in the workflow menu.

The Descriptive Stats object is added to the workflow in the Object Browser.

» Objects automatically open in the right viewing panel when they are inserted into a workflow.

» Each object’s default view is the Setup tab, which contains all the steps necessary to set up an object.

To view the plot in its own window, double-click the Descriptive Stats object or select the plot object and press ENTER. The Descriptive Stats window is displayed.

• The same set of instructions can be used to set up an object if it is dis-played in the right viewing panel or in its own window.

2. Map the data set Bguide2 as the input source for the Descriptive Stats object:

Use the pointer to drag the Bguide2 worksheet from the Data folder to the Main Mappings panel.

OR

In the Descriptive Stats Main Mappings panel click the Select source button to open the Select Source dialog.

Select Bguide2 and click OK.

The Bguide2 data set is mapped to the Descriptive Stats object.

3. Use the option buttons in the Main Mappings panel to map the data types to the following contexts:

Leave Sex mapped to None.

Leave Subject mapped to None.

Map Time to the Sort context.

Map Conc to the Summary context.

Descriptive Stats options are accessible in the Options tab, which is located underneath the Setup tab.

4. Select the Confidence Interval check box. The default setting for the Confi-dence Interval is 95%. Do not change this setting.

5. Select the Number of SD check box. The default setting for the number of standard deviations is 1. Do not change this setting.

6. Click the Execute button. The results are displayed on the Results tab.

7. If the Descriptive Stats object is opened in its own window, close the window.

Return to the window at any time by selecting the Descriptive Stats object in the Object Browser and double-clicking or pressing ENTER.

Plot the mean +/- standard deviation using relative error bars 1. Select the workflow object 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 Descriptive Stats Statistics worksheet as the input source for the XY Plot object:

In the XY Plot XY Data Mappings panel click the Select Source button to open the Select Source dialog.

Select the Descriptive Stat’s 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 objects.

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 Inputs.

Drag the Descriptive Stats Statistics worksheet to the XY Plot’s 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 objects.

Diagram tab mappings

Note: To view the workflow in its own window, double-click the workflow or select the workflow and press ENTER. The workflow window is displayed.

3. Select the XY Plot 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 Mean to the Y context.

Map SD to the Lower and Upper Error Bars.

Leave all other data types mapped to None.

Set plot options:

The plot display options are located in the XY Plot's Options tab.

1. Select Plot > Title. In the Title field type: Mean +/- Standard Devia-tion.

2. Select Graphs > Mean vs Time > Error Bars.

3. User is selected by default in the Error Calculation Type menu. Do not change this setting.

4. Relative is selected by default in the User Calculation Type menu. Do not change this setting.

Using the Relative User Calculation Type causes Phoenix to add and subtract the errors from the mean.

5. Click the Execute button. The results are displayed on the Results tab.

Mean +/- Standard Deviation plot

Plot the median, minimum and maximum using absolute error bars 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.

Note: When multiple objects of the same type are added to a workflow they are numbered sequentially. For example, the second XY Plot object added to this workflow is called XY Plot 1.

2. Map the Descriptive Stats Statistics worksheet as the input source for the XY

In the XY Plot 1 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 1 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 1 Inputs.

Drag the Descriptive Stats Statistics worksheet to the XY Plot 1 XY Data input.

The Statistics worksheet is mapped to the XY Plot 1 object. A line is dis-played that represents the mapping between the Descriptive Stats and XY Plot 1 objects.

3. Select the XY Plot 1 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 Median to the Y context.

Map Min to the Lower Error Bar.

Map Max to the Upper Error Bar.

Leave all other data types mapped to None.

Set plot options:

The plot display options are located in the XY Plot 1's Options tab.

1. Select Plot > Title. In the Title field type Minimum, Median, and Maxi-mum Concentrations.

2. Select Graphs > Median vs Time > Error Bars.

3. In the User Calculation Type menu select Absolute.

Using the Absolute User Calculation Type instructs Phoenix to plot the Min and Max values on the Y axis, rather than to add and subtract them from the Median.

4. Click the Execute button. The results are displayed on the Results tab.

Minimum, Median, and Maximum Concentrations plot