Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
triplej80
 
Posts: n/a
Default How do I plot a trendline that goes through a specified point?

I have a scatter graph and want to plot a trendline that goes through a
specified point first, then to adjust according to the rest of the data. I
also want it to pass the y-axis (unknown point) to be read off the graph. The
trendline must be linear.
  #2   Report Post  
Posted to microsoft.public.excel.charting
MrShorty
 
Posts: n/a
Default How do I plot a trendline that goes through a specified point?


Probably easier to do using worksheet functions than chart trendlines.
basic approach:

Start with the equation for a straight line y=mx+b.
We want to constrain the equation so that the point (x0,y0) are on the
line. Substitute into the equation: y0=m*x0+b
solve for b: b=y0-m*x0
substitute b into original equation: y=mx+y0-m*x0
Associate like terms: y-y0=m*(x-x0)+0 which, if we define new variables
Y=y-y0 and X=x-x0 looks like Y=m*X.
We can now obtain m using the SLOPE function on columns containing y-y0
and x-x0. b is obtained from the above expression for b (b=y0-m*x0).


--
MrShorty
------------------------------------------------------------------------
MrShorty's Profile: http://www.excelforum.com/member.php...o&userid=22181
View this thread: http://www.excelforum.com/showthread...hreadid=509472

  #3   Report Post  
Posted to microsoft.public.excel.charting
triplej80
 
Posts: n/a
Default How do I plot a trendline that goes through a specified point?



Thats wonderful, thank you so much. I can't believe I didn't think of that
before!
Thanks again

Jessica

"MrShorty" wrote:


Probably easier to do using worksheet functions than chart trendlines.
basic approach:

Start with the equation for a straight line y=mx+b.
We want to constrain the equation so that the point (x0,y0) are on the
line. Substitute into the equation: y0=m*x0+b
solve for b: b=y0-m*x0
substitute b into original equation: y=mx+y0-m*x0
Associate like terms: y-y0=m*(x-x0)+0 which, if we define new variables
Y=y-y0 and X=x-x0 looks like Y=m*X.
We can now obtain m using the SLOPE function on columns containing y-y0
and x-x0. b is obtained from the above expression for b (b=y0-m*x0).


--
MrShorty
------------------------------------------------------------------------
MrShorty's Profile: http://www.excelforum.com/member.php...o&userid=22181
View this thread: http://www.excelforum.com/showthread...hreadid=509472


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Point labels in an Excel scatter plot to be associated text Point labels in scatter plot - text? Charts and Charting in Excel 4 April 29th 23 07:45 PM
how do I extract the moving average trendline point data? bobb Charts and Charting in Excel 2 January 10th 06 09:04 AM
Retrieve point address from scatter plot by clicking? Jdoggrr Charts and Charting in Excel 3 October 21st 05 02:02 PM
scatter plot & label for a data point shabnam Charts and Charting in Excel 3 April 11th 05 06:37 PM
How do i approximate the value of a point on the trendline? Dheer Charts and Charting in Excel 2 January 7th 05 02:00 AM


All times are GMT +1. The time now is 02:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"