turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Blogs
- :
- JMP Blog
- :
- Get more from Graph Builder: Points with error bar...

Article Options

- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Email to a Friend
- Printer Friendly Page
- Report Inappropriate Content

Apr 15, 2014 8:40 AM
(14 views)

Get more from Graph Builder: Points with error bars

Error bars are a great way to visually show the variability in your data. They are often seen overlaid on top of bars and points, and a wide range of error bar views is available in **Graph Builder** in JMP.

To see what's possible, let's first build a bar chart using the “Car Physical Data” set from the JMP Sample Data files library. Upon opening Graph Builder, we add the continuous parameter “Gas Tank Size” to the left-hand y-axis and the categorical parameter “Type” to the bottom x-axis. Then we select the Bar icon from the top graph elements menu. Lastly, we go to the bottom left-hand statistics dialog box for Bar and select Mean under “Summary Statistic” and Standard Error under “Error Bars.” This presents a view like the one below. Note that in this graph, we also reduced the transparency of the bar shading so that you can see the error bars more easily when they are overlaid on top of the bars.

But what if we wanted to add error bars not to a bar chart, but instead to a display with points? This is an increasingly popular view that can give both a feel for the spread of the individual points as well as showing the added information of error bars. One way to do this is to take the same Graph Builder view we generated above and just change from the Bar to the Points icon from the top graph elements menu and ask again for Mean as “Summary Statistics”and Error Bars as “Standard Error.” However, as you can see in the graph below, we now lose the points and get only the error bars on the graph.

To create a graph with both error bars and points, we can add another points element from the top graph element menu and drag it down into the graph. Notice that it creates two Points dialog boxes in the left-hand graph statistics section. For the second Points dialog box, we can now select “Summary Statistic” as Mean and “Error Bars” as Standard Error. This presents a view as shown below. We again reduced the transparency of the points so you can see the error bars overlaid on the points better. (Note that another way of adding the second Points dialog is to right-click on the graph, select Add and then choose Points.)

As you can see in the resulting graph, this visual is definitely not very easy to interpret as the error bars are buried within the points. An innovative solution to our problem would be to shift the error bars to the right of the points so we can see both easily on the same graph. We will explore three different ways to do this:

**Solution 1: Add “Label Spacer” Rows**

**Solution 2: Create a “Dummy Variable” Column**

**Solution 3: JMP Scripting for a Custom View**

As the saying goes, “All things are possible with JMP JSL custom scripting!” Below is an example of a custom-scripted view with side-by-side points and error bars. This script does not do any table manipulation or dummy variable creation like the first two solutions. It manipulates the graph points themselves using scripting. So the end product lets us immediately generate our desired view with just the click of a button.

Whichever way you choose to create a graph with both points and error bars, it is easy to see how you can use the versatile Graph Builder platform (along with JMP scripting) to create new and exciting data visualizations!

**Note: Brady Brady, Chris Kirchberg and Xan Gregg contributed to this blog post.**

2 Comments

You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.