ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   chart problem (https://www.excelbanter.com/excel-discussion-misc-queries/26472-chart-problem.html)

geepeetee

chart problem
 
Hi

We are tryng to create a simple chart for my daughters homework. It is to
show the resistance in relation to the length of a piece of wire, a line
graph is needed showing the plotted (slightly curved) line and a line of
best fit.

The data is:

resistance length of wire
0 0
0.10 10
0.23 20
0.35 30
0.50 40
0.60 50
0.70 60
0.80 70
1.00 80


When plotted it shows 2 lines (although they dont look identical to the
school example), but stranger still it has changed the values.

Can anyone advise me how to do this, i am sure its simple stuff.

cheers

Gary




Bill Martin -- (Remove NOSPAM from address)

geepeetee wrote:
Hi

We are tryng to create a simple chart for my daughters homework. It is to
show the resistance in relation to the length of a piece of wire, a line
graph is needed showing the plotted (slightly curved) line and a line of
best fit.

The data is:

resistance length of wire
0 0
0.10 10
0.23 20
0.35 30
0.50 40
0.60 50
0.70 60
0.80 70
1.00 80


When plotted it shows 2 lines (although they dont look identical to the
school example), but stranger still it has changed the values.

Can anyone advise me how to do this, i am sure its simple stuff.

cheers

Gary


----------------------------

Right click on the chart you made and select "Chart Type". My guess is
that you've told it to create a line chart, so since you've given it two
data series it plots two lines. You need to select the "XY (Scatter)"
chart. Then make the first data series the X data and the second the Y
data.

That should give you what you're expecting. Good luck...

Bill

bj

most school books would show resitance vs lengh
I think they should use the XY chart but with the length (second data set)as
the x axis and the resistance (first data set) as the Y axis

"Bill Martin -- (Remove NOSPAM from addre" wrote:

geepeetee wrote:
Hi

We are tryng to create a simple chart for my daughters homework. It is to
show the resistance in relation to the length of a piece of wire, a line
graph is needed showing the plotted (slightly curved) line and a line of
best fit.

The data is:

resistance length of wire
0 0
0.10 10
0.23 20
0.35 30
0.50 40
0.60 50
0.70 60
0.80 70
1.00 80


When plotted it shows 2 lines (although they dont look identical to the
school example), but stranger still it has changed the values.

Can anyone advise me how to do this, i am sure its simple stuff.

cheers

Gary


----------------------------

Right click on the chart you made and select "Chart Type". My guess is
that you've told it to create a line chart, so since you've given it two
data series it plots two lines. You need to select the "XY (Scatter)"
chart. Then make the first data series the X data and the second the Y
data.

That should give you what you're expecting. Good luck...

Bill


geepeetee

Hi

Thanks, that worked a treat. Just one last thing, we need a "line of best
fit" which a straight line which goes through as many points a possible.

I have drawn this on and its fine but wondered if there is a way of letting
the software do it.

Cheers
Gary
"geepeetee" wrote in message
...
Hi

We are tryng to create a simple chart for my daughters homework. It is to
show the resistance in relation to the length of a piece of wire, a line
graph is needed showing the plotted (slightly curved) line and a line of
best fit.

The data is:

resistance length of wire
0 0
0.10 10
0.23 20
0.35 30
0.50 40
0.60 50
0.70 60
0.80 70
1.00 80


When plotted it shows 2 lines (although they dont look identical to the
school example), but stranger still it has changed the values.

Can anyone advise me how to do this, i am sure its simple stuff.

cheers

Gary






Bill Martin -- (Remove NOSPAM from address)

geepeetee wrote:
Hi

Thanks, that worked a treat. Just one last thing, we need a "line of best
fit" which a straight line which goes through as many points a possible.

I have drawn this on and its fine but wondered if there is a way of letting
the software do it.

Cheers
Gary


-------------------------

Right click on the line on your chart. A menu will open which includes
"Add Trendline". You can follow your nose through the steps then to get
a curve fit line of various types to show up. It defaults to a straight
line. You can also ask it to display on the chart the parameters it
found for the line it chose -- slope and offset.

Bill

Bill Martin -- (Remove NOSPAM from address)

geepeetee wrote:
Hi

Thanks, that worked a treat. Just one last thing, we need a "line of best
fit" which a straight line which goes through as many points a possible.

I have drawn this on and its fine but wondered if there is a way of letting
the software do it.

Cheers
Gary
"geepeetee" wrote in message
...


---------------------

At risk of nit picking -- a line of best fit does not go through as many
points as possible. It is a line which minimizes an error function of
some kind. Most commonly it is an LSQ line -- a "Least Squares" fit.
You square the error at each data point, sum all the errors and try to
minimize that function with the generated line. It may well not
actually go through a single point even.

Bill


All times are GMT +1. The time now is 10:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com