User has x, y data with x errors and y errors and wants to display the errors as rectangular boxes in the graph as shown below. This type of plot can be realized using Floating column plot. This tutorial will show the steps. Please also download the project file for the data and result.
Symmetric Error Bars
1. To have the floating columns reflect x,y errors, we first calculate the floating column width and the positions based on the errors. See the formula below: Col(E) contains the width value which is twice of x error. Col(F) and Col(G) contain the minimum and maximum y values of the floating column, should be y – y error and y + y error.
2. Plot the floating columns: Highlight col(F) and col(G), select from menu Plot:2D:Bar:Floating Column to make the plot.
3. But default the boxes are evenly spaced. To show eachbox in specified x value, double click on the x axis, switch to Tick Labels tab. Under Display subtab, Change Type to Numeric. Go the Scale tab and change To to 3.5. Click OK and the graph should look like below:
4. To use the xerror bar as the width of each box, double click on the graph, Select the plot in the left panel, Switch to Spacing tab. Set Width(in %) to Col(E) and Scaling Factor to <0=Use X Unit>.
5. Change to Pattern tab, set Color to Olive and Transparency to 50%. Click OK.
6. We are almost done, next step is to add the data points with error bars onto the graph. Right click on the layer icon on the upper left of the graph and select Plot Setup.... Select Scatter as Plot Type in the left panel. Highlight Layer1 in the bottom panel to make sure the scatter plot is added to Layer1. In the middle panel, set each column to x, y, xEr, yEr of the plot. Click Add the OK.
- Further customize the graph, e.g. set the error bar cap width to 0 (see below) and symbol size to 0 to obtain the final graph.
Asymmetric Error Bars
If negative error and positive error values are not the same, asymmetric x,y errors, we need make some changes to calculate the floating column position and width. See the formula below.
Select column I and J, and follow the steps 2-5 above to make the Floating column graph. In Step 4, Set Width(in %) to Col(H)
In step 6, we need to add two x error columns and two y error columns to the plot.
Note: If you only see yEr column, you can right click on the column header and select y Error Bars Plus/Minus.
In Plot Details dialog, turn off unwanted x or y error bars
Make further changes to obtain the final graph below.