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.
%3CLINGO-SUB%20id%3D%22lingo-sub-804943%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E6%9B%B4%E6%94%B9%E9%9D%9E%E7%BA%BF%E6%80%A7%E4%B8%AD%E6%8B%9F%E5%90%88%E7%BA%BF%E7%9A%84%E9%A2%9C%E8%89%B2%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-804943%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E6%88%91%E6%AD%A3%E5%9C%A8%E4%BD%BF%E7%94%A8%E9%9D%9E%E7%BA%BF%E6%80%A7%E5%B9%B3%E5%8F%B0%E5%B0%86%20y%20%E6%8B%9F%E5%90%88%E4%B8%BA%20x%20%E7%9A%84%E9%9D%9E%E7%BA%BF%E6%80%A7%E5%87%BD%E6%95%B0%E3%80%82%E5%9C%A8%20y%3Df(x)%20%E7%9A%84%E5%9B%BE%E4%B8%AD%EF%BC%8C%E6%88%91%E6%83%B3%E5%B0%86%E6%8B%9F%E5%90%88%E6%9B%B2%E7%BA%BF%E7%9A%84%E9%A2%9C%E8%89%B2%E4%BB%8E%E9%BB%98%E8%AE%A4%E7%9A%84%E9%BB%91%E8%89%B2%E6%9B%B4%E6%94%B9%E4%B8%BA%E5%85%B6%E4%BB%96%E9%A2%9C%E8%89%B2%EF%BC%8C%E8%BF%99%E6%A0%B7%E6%88%91%E5%B0%B1%E5%8F%AF%E4%BB%A5%E4%BD%BF%E7%94%A8%E5%A4%8D%E5%88%B6%E5%92%8C%E7%B2%98%E8%B4%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GO-LABS%20id%3D%22lingo-labs-804943%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3E%E6%95%B0%E6%8D%AE%E6%8E%A2%E7%B4%A2%E4%B8%8E%E5%8F%AF%E8%A7%86%E5%8C%96%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-805066%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%E6%9B%B4%E6%94%B9%E9%9D%9E%E7%BA%BF%E6%80%A7%E4%B8%AD%E6%8B%9F%E5%90%88%E7%BA%BF%E7%9A%84%E9%A2%9C%E8%89%B2%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-805066%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E4%B8%80%E7%A7%8D%E9%80%89%E6%8B%A9%E6%98%AF%E5%B0%86%E5%9B%BE%E5%BD%A2%E8%84%9A%E6%9C%AC%E4%B8%8E%E5%85%B6%E4%BB%96%E5%9B%BE%E5%BD%A2%E8%84%9A%E6%9C%AC%E5%8F%A0%E5%8A%A0%E3%80%82%E5%8F%AF%E8%83%BD%E6%9C%89%E4%B8%80%E7%A7%8D%E6%96%B9%E6%B3%95%E5%8F%AF%E4%BB%A5%E5%B0%86%E7%AC%94%E9%A2%9C%E8%89%B2%E6%B7%BB%E5%8A%A0%E5%88%B0%E2%80%9C%E5%BD%93%E5%89%8D%E6%A8%A1%E5%9E%8B%E6%8B%9F%E5%90%88%E2%80%9D%EF%BC%8C%E4%BD%86%E6%88%91%E4%B8%8D%E7%A1%AE%E5%AE%9A%E5%A6%82%E4%BD%95%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20To%20Here(1)%3B%0Adt%20%3D%20Open(%22%24SAMPLE_DATA%2FNonlinear%20Examples%2FUS%20Population.jmp%22)%3B%0Aobj%20%3D%20dt%20%26lt%3B%26lt%3B%20Nonlinear(Y(%3Apop)%2C%20X(%3A%22X-formula%22n)%2C%20Finish())%3B%0AEval(EvalExpr(%0A%09Report(obj)%5BFrameBox(1)%5D%20%26lt%3B%26lt%3B%20Add%20Graphics%20Script(%0A%09%09p%20%3D%20Expr(Report(obj)%5BFrameBox(1)%5D)%3B%0A%09%09Pen%20Color(%22Red%22)%3B%0A%09%09f1%20%3D%20(p%20%26lt%3B%26lt%3B%20Find%20Seg(Top%20Seg(1)))%20%26lt%3B%26lt%3B%20get%20script%3B%0A%09%09f2%20%3D%20Arg(f1)%3B%0A%09%09If(Head%20Name(f2)%20%3D%3D%20%22Y%20Function%22%2C%0A%09%09%09Eval(f2)%3B%0A%09%09)%3B%0A%09)%3B%09%0A))%3B%0A%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-806914%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%E6%9B%B4%E6%94%B9%E9%9D%9E%E7%BA%BF%E6%80%A7%E4%B8%AD%E6%8B%9F%E5%90%88%E7%BA%BF%E7%9A%84%E9%A2%9C%E8%89%B2%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-806914%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E9%9D%9E%E5%B8%B8%E6%A3%92%E7%9A%84%E7%A0%B4%E8%A7%A3%EF%BC%81%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%E6%9C%89%E4%BA%BA%E5%8F%AF%E4%BB%A5%E5%B0%86%E5%85%B6%E6%A0%87%E8%AE%B0%E4%B8%BA%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%88%E5%90%97%EF%BC%9F%3C%2FP%3E%3C%2FLINGO-BODY%3E
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