cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
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 XII

Re: Change color of fitted line in Nonlinear

wonderful hack!

 

can somebody mark it as a solution?