1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Plotting Graphs to fit the Data

  1. Sep 14, 2016 #1
    1. The problem statement, all variables and given/known data
    Hi, we investigated how the length of a pendulum affects the time period of oscillation. We collected data by changing the length (l) of the pendulum and measuring the time period (T). We then squared the T value before plotting it on the y-axis and on the x-axis we just plotted 'l'. This gives a straight line graph.

    2. Relevant equations
    T = 2 pi sqrt (l/g)

    3. The attempt at a solution
    My problem is that in physics we get marked down if our data points do not occupy most of the graph paper. The problem I have is that my first value of T squared is quite far away from zero. This leaves a big gap for the first part of the graph. There seems to be two ways it suggests online to overcome this. Either put a break in the y axis (a sort of squiggle) and then start close to the first value collected. The other method says to just start your graph not at zero but at a value close to your first reading. Is it ok to start a graph at somewhere other than zero? If so, what is the point in the method that uses a break in the axis? It seems like a waste of graph space if you can just start it at a non zero value. Is it ok to actually start the y-axis at the exact value of your first reading if it is a nice even number e.g. 6.0? Or is it better to start at say 5.0?

    Thanks for any help!
  2. jcsd
  3. Sep 14, 2016 #2


    User Avatar
    Gold Member

    I consider that fairly ridiculous as a general statement but the prof is always right (and there ARE cases where it would make good sense). I'd start w/ the first integer below the first value (on both axis if that is needed. Just be SURE to label carefully.
  4. Sep 14, 2016 #3


    User Avatar
    Gold Member

    It seems perfectly reasonable to me to start your axes wherever it suits you.
    You can do the necessary calculation to find the slope, at any part of the line.
    The intercept is not quite so obvious and takes a bit more work, but you don't need to find it here.

    In fact, you already know what the intercept must be, which leads to one reservation about leaving (0,0) off the graph. Since you know the best straight line must go through (0,0), you are making the line harder to estimate if this point is not on your graph.
    IMO you are more likely to get a better estimate of the slope if you include (0,0) on the graph and ensure your line goes through it.
  5. Sep 14, 2016 #4


    User Avatar
    Gold Member

    to follow through on both my statement and also to exemplify what Merlin said at the end, consider these two graphs. They are of exactly the same data but the second one has had the axes modified so that the graph "take up most of the graph paper". I consider the first graph to be just fine and the second one sucks because at first glance you have the immediate impression that the slope is 45 degrees. Admittedly, the second one will give more clarity of the exact value of the points and there is some merit in that.

  6. Sep 14, 2016 #5


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    I agree with your tutor. If you are trying to calculate the slope by reading off Δy and Δx from the graph and calculating Δy/Δx then arranging for your data points to fill the graph/page will give you a more accurate answer.

    It is frequently impractical to start a graph at zero. Suppose you wanted to show how daytime temperature changed over the past year. You might choose to start the x-axis on 1st January 2016, however time didn't start on 1st January 2016. Time has been running for 13.8 billion years or so. What would your graph look like if you started it at t=0 instead of 1st January 2016?

    Anyone interested in stocks and shares will be familiar with looking at how share prices have varied over the past week, month year etc. That involves changing the origin and the scale of the axis. It's very hard to see how a share price has changed over the past week if your graph has say 10 years worth of data on it. The week you are interested in will be compressed into a tiny fraction of the graph.
  7. Sep 14, 2016 #6
    Thanks. Just out of interest why would you say it is ridiculous? The teachers reasoning was that it magnifies your trend. He showed us two graphs of the same results - one only using half the paper and one using all of it. The one only using half had a point just slightly off the straight line trend but could still be included in it. This point in the other graph was way off the trend and couldn't be used in the straight line trend with the other points. So it highlighted this point as anomaly in the bigger graph.

    Also, what is the point in using a break in the axis? As oppose to starting the graph where you want at a non zero value?
  8. Sep 14, 2016 #7


    User Avatar
    Gold Member

    I have an unfortunate tenancy to use extreme language. :smile:

    As far as I'm aware it's just to emphasize that your scale is NOT starting at zero and going linearly out to the end. I like that technique because it doesn't change the slope. It helps avoid the issue of mistaking what the slope is (as long as you don't also change the spacing of the hash marks on the axes by different factors (which puts you back to making it possible to misunderstand what the slope is).
  9. Sep 14, 2016 #8
    Thanks. Sorry, I didn't have any wrong with the word 'ridiculous' at all. Just wanted to know why you didn't like the idea mentioned. Thank you to all for your help.
  10. Sep 14, 2016 #9


    User Avatar
    Gold Member

    See post #4
  11. Sep 14, 2016 #10


    User Avatar
    Gold Member

    CWatters is right in so far as it is easier to read data from a larger graph and maybe to estimate the errors when choosing the line of best fit.

    But in this case we are not simply trying to find a least squares regression line for the plotted data points. We are trying to find which line through the origin is the best fit to the data points. You could do that simply from the data, but if you are using a graphical method, I think you need to be able to see the origin and draw (or at least lay a ruler down on) test lines to find the best fit.

    It's horses for courses. You want the graph that best enables you to do what you want. And your examples about historical data such as temperature are cases where your main objectives are to display the data effectively to the audience and maybe to allow them to read off data points. Choosing suitable axes to enable this is right and proper. Even the broken axes may be useful.
    But there are misuses as well.
    Quite right. But often stock price graphs compare with a sector average or other index. If this conveniently starts a a point where the stock was at a low, then it gives a much rosier picture than it would have done if the comparison had started at a high for the stock.

    If poll results were say 31%, 33% and 35% for three parties, this would look much more dramatic on a graph whose axis started at 30% than one that ran from 0%. I'm sure politicians and newspapers understand this one.

    On a different tack, if you need to plot points over the whole paper, then another tactic would be to choose the data points you measure in the first place. Jimmy found his smallest T2 was too big, so perhaps he should have measured some much shorter pendulums? But these are likely to be less reliable than his longer data points. He might meet his professor's requirements, but get worse results.
  12. Sep 14, 2016 #11
    Plot the data as T vs l, and have your graphics package switch to logarithmic axes for both. This will give a straight line with a slope of 1/2, and you won't need to use a point at 0,0 (since it will automatically pass through 0,0). Plus, you an choose whatever decades you wish to have included on the graph. All you need to do then is confirm that the slope n is indeed 1/2, and then calculate the constant k in the equation ##T=kl^n## from the straight line on the graph.
  13. Sep 15, 2016 #12
    Let us see the data, and I'll show you what I mean.
  14. Sep 15, 2016 #13
    remember that this student is plotting results on graph paper, presumably learning graph plotting techniques. When you understand what you are doing 'graphics packages' are so convenient but....as a way of learning...I would say no.
  15. Sep 15, 2016 #14
    Thanks. Of course the OP could manually take the log of T (using a calculator or log table) and plot it against the log of l on graph paper. Then he could evaluate the slope and the intercept of the resulting straight line to get n and logk, respectively. Or he could use log-log graph paper (I assume log-log paper is still commercially available).
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted

Similar Discussions: Plotting Graphs to fit the Data
  1. Plotting graphs (Replies: 2)

  2. Curve Fitting Data (Replies: 1)