cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
Neo
Neo
Level VI

Fit independent lines to two sections of data in the same plot

I am coming from my earlier question on linear fit solved here.

In my actual case all the data points do not strictly fall in straight line (which is expected from theory). Please see attached where the smoothing blue line is a guide to the eye.

I would like to fit a straight line to the upper 4 (or 5) points and separately a straight-line to the 3 (or 2) points and get the equation (or slope) for each. How to best implement this (perhaps with both lines visible)?

 

Linearfit2.PNG

When it's too good to be true, it's neither
1 ACCEPTED SOLUTION

Accepted Solutions
markschwab
Level IV

Re: Fit independent lines to two sections of data in the same plot

You could create a new column (e.g. "Group"), with different designations (e.g. "A" for the first 3 points and "B" for the rest). Then put Group into the Overlay role, and when you add the fit line it will report equations for both fit lines.

View solution in original post

1 REPLY 1
markschwab
Level IV

Re: Fit independent lines to two sections of data in the same plot

You could create a new column (e.g. "Group"), with different designations (e.g. "A" for the first 3 points and "B" for the rest). Then put Group into the Overlay role, and when you add the fit line it will report equations for both fit lines.

Recommended Articles