Dot Physics

Tools: Error bars on graphs

I am not going to try and even surprise you with this. Notice the “tools:”. This post is not about physics really, but something used in physics. When I get enough of these, I will put them together in a “tools” page – or you can just use the tools-tag.

Suppose you have some data. You want to plot that data and turn it in with your lab report. Your instructor (me) told you to be sure and include error bars on your graph.

  • What are error bars?
  • How do you add error bars – whatever they are?

Error bars are a way to graphically represent the uncertainty in a data point. Every time you take a measurement or make a calculation, it is not an exact number. I am not going into a long talk about uncertainty, I will just give an example. Suppose you determine the mass of a book – you make represent that as:

i-d6eb019c20e8e96b9b20d9746cbb2894-mass-error.jpg

This says that the real mass of the book is almost certainly (but not absolutely) between 0.53 kg and 0.61 kg. Enough about uncertainty. How do you represent this in Logger Pro, Excel-Open Office. I am going to show how to do this in Logger Pro and OpenOffice. OpenOffice and Excel are similar enough that I shouldn’t have to do it for both of them.

Error Bars in Logger Pro

First, you need to make a graph in Logger Pro. The default page on Logger Pro is to give you two columns of data. This will need three (or more). Here is the default setup (sort of):

i-2a3fbe278175c1ff6162feb193d23041-lp-1.jpg

Make the graph window smaller and the data set window larger. Next go to Data-New Manual Column. This new column will contain your uncertainty values. You can really call it whatever you like. I am going to call mine “error”.

i-9adf9feb189abee031f204cdfcbbc5b5-error-1.jpg

Now I just need to make up some data to plot. I need x,y, and error values. I am only going to pretend like there is uncertainty in the y-values. Here is what I made up:

i-95e23a8dafddb8dfc70845b2d87fd896-data.jpg

Note, that if you hit the button at the top that looks like an “A”, the graph will autoscale so things look nicer. Also note that I didn’t put units and labels on stuff (although generally, this is a good idea). The next step is to tell Logger Pro that you want to use the “error” column as the uncertainty for the y-column.

  • Double click on the y-column in the data set (at the top).
  • Click on the “options” tab.
  • Check the box that says “Error Bar Calculations”
  • Check the button that says “use column”
  • Choose the column “Data Set|error” – or whatever you called it.

i-b0a9cb93fbca0706341597b434cd1a2e-errorsetting.jpg

That is it. Here is the final thing (again, no titles and stuff).

i-78fc02a7bc7bcc038b15f8c020b31159-errorgraph-334.jpg

The error bars look small, but that is often how it turns out. You can put error bars for both x- and y-data, but I just did y-data here for an example.

Open Office

I have actually never done this in Open Office 3, but I did sleep in a Holiday Inn Express. I should be ok. The first step is to put the data in – easy enough. I just tested this out and the error that I used before would be too small, so I made it larger.

i-11eb36621428d7365a3429daac89245c-ooerror-1.jpg

Now make a graph. Be sure it is an “x-y scatter” and not “line” – see how good Open Office is? They even use the dumb names that Excel uses for types of graphs. Only plot the X and Y values. I opted to not have data point labels and just had the line.

Next, double click on the graph to make it “active”. Now right click (secondary click) on one of the data points. There should be a pull down menu. Choose “insert y-error bars”. You should get a menu like this:

i-13710e074996ec9412a6517c493332c6-ooerror-3.jpg

Use the values as indicated in the above picture and you should get something like this:

i-a1ce48146768d2c1f4c63c4eddd26970-ooerror-34.jpg

This should be essentially the same thing in MS Excel, but I gave up MS Office for the new year, so I can’t show you that.

Comments

  1. #1 jim
    September 4, 2010

    Thank you very much for this, you saved me!

  2. #2 Anonymous
    February 9, 2011

    thanks a lot

  3. #3 Ria Singh
    September 8, 2011

    thankyou so much !

  4. #4 olivia
    October 2, 2011

    you just saved my life

  5. #5 Sujith
    October 11, 2011

    THANKS BRO!

  6. #6 Anonymous
    February 16, 2012

    Thank You so much!! I was having a hard time with this.

New comments have been disabled.