cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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%E9%9D%9E%E7%B7%9A%E5%BD%A2%E8%BF%91%E4%BC%BC%E7%B7%9A%E3%81%AE%E8%89%B2%E3%82%92%E5%A4%89%E6%9B%B4%E3%81%99%E3%82%8B%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-804943%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E7%A7%81%E3%81%AF%E3%80%81%E9%9D%9E%E7%B7%9A%E5%BD%A2%E3%83%97%E3%83%A9%E3%83%83%E3%83%88%E3%83%95%E3%82%A9%E3%83%BC%E3%83%A0%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%A6%E3%80%81y%20%E3%82%92%20x%20%E3%81%AE%E9%9D%9E%E7%B7%9A%E5%BD%A2%E9%96%A2%E6%95%B0%E3%81%A8%E3%81%97%E3%81%A6%E3%83%95%E3%82%A3%E3%83%83%E3%83%86%E3%82%A3%E3%83%B3%E3%82%B0%E3%81%97%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%80%82y%3Df(x)%20%E3%81%AE%E3%83%97%E3%83%AD%E3%83%83%E3%83%88%E3%81%A7%E3%80%81%E3%83%95%E3%82%A3%E3%83%83%E3%83%86%E3%82%A3%E3%83%B3%E3%82%B0%E3%81%95%E3%82%8C%E3%81%9F%E6%9B%B2%E7%B7%9A%E3%81%AE%E8%89%B2%E3%82%92%E3%83%87%E3%83%95%E3%82%A9%E3%83%AB%E3%83%88%E3%81%AE%E9%BB%92%E3%81%8B%E3%82%89%E4%BB%96%E3%81%AE%E8%89%B2%E3%81%AB%E5%A4%89%E6%9B%B4%E3%81%97%E3%80%81%E3%83%91%E3%83%A9%E3%83%A1%E3%83%BC%E3%82%BF%E3%82%92%E6%89%8B%E5%8B%95%E3%81%A7%E8%AA%BF%E6%95%B4%E3%81%99%E3%82%8B%E3%81%A8%E3%81%8D%E3%81%AB%E3%80%81%E3%83%95%E3%83%AC%E3%83%BC%E3%83%A0%20%E3%82%B3%E3%83%B3%E3%83%86%E3%83%B3%E3%83%84%E3%81%AE%E3%82%B3%E3%83%94%E3%83%BC%20%E3%82%A2%E3%83%B3%E3%83%89%20%E3%83%9A%E3%83%BC%E3%82%B9%E3%83%88%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%A6%E3%80%81%E6%9B%B2%E7%B7%9A%E3%81%AE%E8%89%B2%E5%88%86%E3%81%91%E3%81%95%E3%82%8C%E3%81%9F%E3%83%90%E3%83%BC%E3%82%B8%E3%83%A7%E3%83%B3%E3%82%92%E9%87%8D%E3%81%AD%E5%90%88%E3%82%8F%E3%81%9B%E3%81%9F%E3%81%84%E3%81%A8%E8%80%83%E3%81%88%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%E3%83%97%E3%83%AD%E3%83%83%E3%83%88%E9%A0%98%E5%9F%9F%E3%82%92%E5%8F%B3%E3%82%AF%E3%83%AA%E3%83%83%E3%82%AF%E3%81%97%E3%81%A6%20%5B%E3%82%AB%E3%82%B9%E3%82%BF%E3%83%9E%E3%82%A4%E3%82%BA%5D%20%E3%82%92%E9%81%B8%E6%8A%9E%E3%81%97%E3%80%81%E3%83%9E%E3%83%BC%E3%82%AB%E3%83%BC%E3%81%AE%E8%89%B2%E3%82%92%E5%A4%89%E6%9B%B4%E3%81%99%E3%82%8B%E3%81%93%E3%81%A8%E3%81%AF%E3%81%A7%E3%81%8D%E3%81%BE%E3%81%99%E3%81%8C%E3%80%81%E3%83%95%E3%82%A3%E3%83%83%E3%83%86%E3%82%A3%E3%83%B3%E3%82%B0%E3%81%95%E3%82%8C%E3%81%9F%E6%9B%B2%E7%B7%9A%E3%81%AE%E8%89%B2%E3%82%92%E5%A4%89%E6%9B%B4%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95%E3%81%8C%E3%82%8F%E3%81%8B%E3%82%8A%E3%81%BE%E3%81%9B%E3%82%93%E3%80%82%E3%81%9D%E3%82%8C%20(%E3%83%95%E3%82%A3%E3%83%83%E3%83%86%E3%82%A3%E3%83%B3%E3%82%B0%E3%81%95%E3%82%8C%E3%81%9F%E6%9B%B2%E7%B7%9A%E3%81%AE%E8%89%B2%E3%81%AE%E5%A4%89%E6%9B%B4)%20%E3%81%AF%E5%8F%AF%E8%83%BD%E3%81%A7%E3%81%99%E3%81%8B%E3%80%82%E5%8F%AF%E8%83%BD%E3%81%A7%E3%81%82%E3%82%8C%E3%81%B0%E3%80%81%E3%81%A9%E3%81%AE%E3%82%88%E3%81%86%E3%81%AB%E3%81%99%E3%82%8C%E3%81%B0%E3%82%88%E3%81%84%E3%81%A7%E3%81%99%E3%81%8B%E3%80%82%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%E3%81%82%E3%82%8A%E3%81%8C%E3%81%A8%E3%81%86%EF%BC%81%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-804943%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3E%E3%83%87%E3%83%BC%E3%82%BF%E3%81%AE%E6%8E%A2%E7%B4%A2%E3%81%A8%E8%A6%96%E8%A6%9A%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%3ERe%3A%20%E9%9D%9E%E7%B7%9A%E5%BD%A2%E3%81%AE%E9%81%A9%E5%90%88%E7%B7%9A%E3%81%AE%E8%89%B2%E3%82%92%E5%A4%89%E6%9B%B4%E3%81%99%E3%82%8B%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-805066%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E1%E3%81%A4%E3%81%AE%E3%82%AA%E3%83%97%E3%82%B7%E3%83%A7%E3%83%B3%E3%81%AF%E3%80%81%E3%82%B0%E3%83%A9%E3%83%95%E3%82%A3%E3%83%83%E3%82%AF%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%97%E3%83%88%E3%82%92%E4%BB%96%E3%81%AE%E3%82%B0%E3%83%A9%E3%83%95%E3%82%A3%E3%83%83%E3%82%AF%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%97%E3%83%88%E3%81%A7%E3%82%AA%E3%83%BC%E3%83%90%E3%83%BC%E3%83%AC%E3%82%A4%E3%81%99%E3%82%8B%E3%81%93%E3%81%A8%E3%81%A7%E3%81%99%E3%80%82%E3%80%8C%E7%8F%BE%E5%9C%A8%E3%81%AE%E3%83%A2%E3%83%87%E3%83%AB%E3%83%95%E3%82%A3%E3%83%83%E3%83%88%E3%80%8D%E3%81%AB%E3%83%9A%E3%83%B3%E3%81%AE%E8%89%B2%E3%82%92%E8%BF%BD%E5%8A%A0%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95%E3%81%8C%E3%81%82%E3%82%8B%E3%81%8B%E3%82%82%E3%81%97%E3%82%8C%E3%81%BE%E3%81%9B%E3%82%93%E3%81%8C%E3%80%81%E6%96%B9%E6%B3%95%E3%81%8C%E3%82%8F%E3%81%8B%E3%82%8A%E3%81%BE%E3%81%9B%E3%82%93%E3%80%82%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%3ERe%3A%20%E9%9D%9E%E7%B7%9A%E5%BD%A2%E3%81%AE%E9%81%A9%E5%90%88%E7%B7%9A%E3%81%AE%E8%89%B2%E3%82%92%E5%A4%89%E6%9B%B4%E3%81%99%E3%82%8B%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-806914%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E7%B4%A0%E6%99%B4%E3%82%89%E3%81%97%E3%81%84%E3%83%8F%E3%83%83%E3%82%AF%E3%81%A7%E3%81%99%EF%BC%81%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%E8%AA%B0%E3%81%8B%E3%81%93%E3%82%8C%E3%82%92%E8%A7%A3%E6%B1%BA%E7%AD%96%E3%81%A8%E3%81%97%E3%81%A6%E3%83%9E%E3%83%BC%E3%82%AF%E3%81%97%E3%81%A6%E3%82%82%E3%82%89%E3%81%88%E3%81%BE%E3%81%99%E3%81%8B%3F%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