# Plotting Graphs to fit the Data

• Jimmy87
In summary, in this conversation, the participants discussed the issue of starting a graph at zero and the use of breaks in the axis. They also mentioned the importance of labeling carefully and the potential impact on the accuracy of the slope when arranging data points to fill the graph. They also discussed the practicality of starting a graph at zero in certain situations and the usefulness of using breaks in the axis to emphasize non-linear scales.
Jimmy87

## Homework Statement

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.

## Homework Equations

T = 2 pi sqrt (l/g)

## 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!

Jimmy87 said:
My problem is that in physics we get marked down if our data points do not occupy most of the graph paper.
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.

Jimmy87
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.

Jimmy87
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.

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.

Jimmy87
phinds said:
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.

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?

Jimmy87 said:
Thanks. Just out of interest why would you say it is ridiculous?
I have an unfortunate tenancy to use extreme language.

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?
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).

phinds said:
I have an unfortunate tenancy to use extreme language.

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).

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.

Jimmy87 said:
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
See post #4

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.
CWatters said:
... 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.
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.

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.

Let us see the data, and I'll show you what I mean.

Chestermiller said:
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.

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.

lychette said:
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.
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).

## 1. How do I choose the appropriate type of graph for my data?

The type of graph you choose depends on the type of data you have and the relationship you want to show. For example, if you have continuous data and want to show trends over time, a line graph would be most suitable. If you want to compare different categories or groups, a bar or pie chart would be more appropriate.

## 2. How do I label my axes correctly?

When labeling your axes, make sure to include the variable and unit of measurement. The x-axis should represent the independent variable and the y-axis should represent the dependent variable. Also, ensure that the scale of the axes is appropriate for the range of your data.

## 3. How do I plot multiple sets of data on one graph?

To plot multiple sets of data on one graph, you can use different colors or symbols to distinguish between them. You can also use a legend to label each set of data.

## 4. How do I interpret trends and patterns in my graph?

When analyzing a graph, look for any patterns or trends in the data. This could include a steady increase or decrease, a peak or dip, or any other noticeable pattern. You can also calculate statistics such as slope, correlation coefficient, and standard deviation to further understand the relationship between the variables.

## 5. How do I determine if my data points are accurate?

To determine the accuracy of your data points, you can compare them to a known or expected value. If the data points are close to the expected value, then they are considered accurate. You can also calculate the error or percent error for each data point to evaluate its accuracy.

• Introductory Physics Homework Help
Replies
14
Views
1K
• Introductory Physics Homework Help
Replies
7
Views
3K
• Introductory Physics Homework Help
Replies
1
Views
1K
• Introductory Physics Homework Help
Replies
6
Views
1K
• Introductory Physics Homework Help
Replies
3
Views
7K
• Introductory Physics Homework Help
Replies
9
Views
2K
• Introductory Physics Homework Help
Replies
10
Views
1K
• Introductory Physics Homework Help
Replies
3
Views
2K
• Introductory Physics Homework Help
Replies
17
Views
3K
• Introductory Physics Homework Help
Replies
4
Views
1K