cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Graph Builder Toolbar streamlines interactive graphing. Creates shortcuts on Report and GraphBuilder Helpers toolbars. Download and install the extension.
  • JMP will suspend normal business operations for our Rest and Recharge Day on Friday, October 2, 2026.
    Regular business hours will resume on Monday, October 5, 2026.

Discussions

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

Change color of fitted line in Nonlinear

I am using the Nonlinear platform to fit y as a nonlinear function of x. In the plot of y=f(x), I want to change the color of the fitted curve from default black to some other color, so I can use copy and paste frame contents to overlay color-coded versions of the curve as I make manual adjustments to the parameters. By right-clicking in the plot area I am able to select Customize and then change the color of the markers, but I don't see any way of changing the color of the fitted curve. Is it possible to do that (change the color of the fitted curve), and if so, how?

 

Thanks!

2 REPLIES 2
jthi
Super User

Re: Change color of fitted line in Nonlinear

One option could be to overlay the graphic script with other graphic script. There might be a way to add pen color to the "Current Model Fit" but I'm not sure how

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Nonlinear Examples/US Population.jmp");
obj = dt << Nonlinear(Y(:pop), X(:"X-formula"n), Finish());
Eval(EvalExpr(
	Report(obj)[FrameBox(1)] << Add Graphics Script(
		p = Expr(Report(obj)[FrameBox(1)]);
		Pen Color("Red");
		f1 = (p << Find Seg(Top Seg(1))) << get script;
		f2 = Arg(f1);
		If(Head Name(f2) == "Y Function",
			Eval(f2);
		);
	);	
));
-Jarmo
hogi
Level XIII

Re: Change color of fitted line in Nonlinear

wonderful hack!

 

can somebody mark it as a solution?

Recommended Articles