Error Bars and Highlighting can be added to Bar Plots and to Scatter Plots.  In this example, we will add these features to a Bar Plot.

1.Select File tab→Open.
2.Open the layout titled "Error Bars.fey" within the Tutorial Sample Data archive.

A Custom Data Grid and its associated Bar Plot without Error Bars or Highlighting already exist on the layout.  The Bar Plot is graphing the means of the "apo" and "necro" %-gated statistic for each of the three Color Dot Plots.  This is accomplished through the use of array formulae within the Custom Data Grid, which can be seen when clicking on either of the cells in the "dataset 1" column (Fig. 30, red outline).

Figure 30.  Array formula (partially visible here) for calculating the mean of three tokens in a Custom Data Grid

Figure 30.  Array formula (partially visible here) for calculating the mean of three tokens in a Custom Data Grid

We will also employ an array formula to calculate the error bars in this example;  however, error bars may also derive from default Statistic Tokens or from freetext.

3.Click on any cell in the "dataset 1" column to select it.
4.Right-click on "dataset 1" Column of the Custom Data Grid.
5.Select Insert→Column to the Right from the pop-up menu (Fig. 31, number1).
Figure 31.  Inserting a Column in a Custom Data Grid

Figure 31.  Inserting a Column in a Custom Data Grid

6.Type "error bars" in the New Column Name dialog (Fig. 31, number2).
7.Click OK.
8.Click on row 1 of the error bars column in the Custom Data Grid (Fig. 32, number1) to highlight it.
9.Type "=" in the Custom Data Grid formula editor (Fig. 32, number2).
Figure 32.  Inserting a function into the Custom Data Grid cell

Figure 32.  Inserting a function into the Custom Data Grid cell

10. Right-click in the Custom Data Grid formula editor after the "=" sign.
11. Select Insert Function→Math→StdDev([number1,number2,...]) from the pop-up menu (Fig. 32, number3).

 

We will now enter Statistic Tokens from plots on the layout as components of the StdDev array formula.

 

12. Double-click the "number1" component of the StdDev formula within the Custom Data Grid formula editor so that it becomes highlighted in blue (Fig. 33, number1).
Figure 33.  Entering a token as a component of the Standard Deviation formula

Figure 33.  Entering a token as a component of the Standard Deviation formula

13. Click the T Button button in the Custom Data Grid formula editor (Fig. 33, number2).
14. Double-click Statistic in the Insert a Token dialog box (Fig. 33, number3).
15. Click on 2-Color Dot-Apomono.001... from the Data Source category→Select a Plot (Fig. 34, mouse arrow).
Figure 34.  Choosing the Data Source of a token for insertion in the Custom Data Grid

Figure 34.  Choosing the Data Source of a token for insertion in the Custom Data Grid

16. Click on the Statistic category (Fig. 35, number1).
Figure 35.  Choosing the gate and statistic for the token being inserted in the Custom Data Grid

Figure 35.  Choosing the gate and statistic for the token being inserted in the Custom Data Grid

17. Select "apo" from the Select Gate dropdown list (Fig. 35, number2).
18. Select % of gated cells from the Statistic list box (Fig. 35, number3).
19. Click OK.
20. Double-click the "number2" component of the StdDev formula within the Custom Data Grid formula editor so that it becomes highlighted in blue (Fig. 36).
Figure 36.  Double-clicking on a component of an array formula to replace it with a token

Figure 36.  Double-clicking on a component of an array formula to replace it with a token

21. Repeat Steps 13-19, with the following modifications:
Step 15: Click on 3-Color Dot-Apomono.002... from the Data Source category→Select a Plot.
Step 17: select "apo 2" from the Select Gate dropdown list
22. Highlight the ellipsis ("...") component of the StdDev formula within the Custom Data Grid formula editor (Fig. 37).
Figure 37.  Double-clicking on the ellipsis component of an array formula to replace it with a token

Figure 37.  Double-clicking on the ellipsis component of an array formula to replace it with a token

23. Repeat Steps 13-19, with the following modifications:
Step 15: Click on 4-Color Dot-Apomono.003... from the Data Source category→Select a Plot.
Step 17: select "apo 3" from the Select Gate dropdown list .

The Custom Data Grid "apo" row now contains a complete StdDev array formula for the error bar, which has been evaluated with the result shown in the upper-right cell of the Grid (Fig. 38).

Figure 38.  Completed array formula within the Custom Data Grid and its result displayed in the selected Cell

Figure 38.  Completed array formula within the Custom Data Grid and its result displayed in the selected Cell

We will now enter the corresponding error bar formula for the "necro" row of the Custom Data Grid, by copying and pasting the complete StdDev formula we just created and changing the gates in the component Statistic Tokens.

24. Click on row 1 of the "error bars" column in the Custom Data Grid, which contains the the complete StdDev formula created in Steps 9 through 23 (Fig. 39, number1).
Figure 39.  Copying and pasting an array formula from one cell to another in the Custom Data Grid

Figure 39.  Copying and pasting an array formula from one cell to another in the Custom Data Grid

25. Click in the Custom Data Grid formula editor (Fig. 39, number2).
26. Press CTRL+A on the keyboard to select all.
27. Press CTRL+C to copy (Fig. 39, number3).
28. Click on row 2 of the "error bars" column in the Custom Data Grid (Fig. 39, number4).
29. Click in the Custom Data Grid formula editor.
30. Press CTRL+V on the keyboard to paste the formula (Fig. 39, number5).
31. Double-click the first component token in the StdDev formula within the custom data grid formula editor (statistic:% of gated cells for 2 - Color Dot - ApoMono.001 compensated....).
32. Click on the Statistic category (Fig. 40, number1).
33. Select "necro" from the Select Gate dropdown list (Fig. 40, number2).
Figure 40.  Editing a token

Figure 40.  Editing a token

34. Click OK (Fig. 40, number3).
35. Repeat steps 31-34 with the second and third tokens of the StdDev formula in row 2 of the "error bars" column, selecting the "necro 2" and "necro 3" gates respectively.
36. Double-click the Bar Plot to open the Formatting dialog.
37. Click on the Overlays category (Fig. 41, number1).
Figure 41.  Adding error bars to a Bar Plot in the Formatting dialog

Figure 41.  Adding error bars to a Bar Plot in the Formatting dialog

38. Choose "error bars" from 2D Bar Overlay Options→Error Bar Param dropdown list (Fig. 41, number2).
39. Select red from the Color dropdown menu of the Error Bar Properties section (Fig. 41, number3).
40. Click OK (Fig. 41, number4).

The Bar Plot will now appear as in Fig. 41, right.

41. Optional:
Click the Data tab→Change Data on All→ Next/Previous buttons to advance through the set of files in the Data List and watch as the Bar Plot and Scatter Plot update with the new data.
Adjust the gates on the plots and watch the Bar Plot and Scatter Plot update in real-time.

 

In the next section we will add highlighting and exploding parameters to Bar, Scatter, and Pie Plots.