cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • See how to interactively organize and restructure data for analysis. Register for May 29 webinar, 2pm US ET.

Discussions

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

Fit Special Limits JSL

Hi all,

 

I am using Fit Y by X Plot and I need 3 limits on my plots (Control Limit, Upper Limit and Lower Limit) where I used the fit special 3 times and input the slope and intercept needed. But I don't know how to do this in JSL. This is only the output I get when I save the script to script window

Bivariate(
	Y( :Age ),
	X( :Sex ),
	Fit Line( {Confid Curves Indiv( 1 ), Line Color( "Black" )} ),
	Fit Line( {Line Color( {196, 189, 43} )} ),
	Fit Line( {Line Color( {39, 174, 174} )} ),
	SendToReport(
		Dispatch(
			{},
			"Bivar Plot",
			FrameBox,
			{DispatchSeg( Line Seg( 1 ), {Line Color( "Black" )} ),
			DispatchSeg( Line Seg( 4 ), {Line Color( "Black" )} ),
			DispatchSeg( Line Seg( 5 ), {Line Color( "Black" )} ),
			Row Legend(
				Blade Type,
				Color( 1 ),
				Color Theme( "JMP Default" ),
				Marker( 0 ),
				Marker Theme( "" ),
				Continuous Scale( 0 ),
				Reverse Scale( 0 ),
				Excluded Rows( 0 )
			)}
		),
		Dispatch( {}, "Linear Fit", OutlineBox, {Close( 1 )} ),
		Dispatch( {}, "Linear Fit", Outline Box( 2 ), {Close( 1 )} ),
		Dispatch( {}, "Linear Fit", Outline Box( 3 ), {Close( 1 )} )
	)
);

Is there any way I can input or customize the intercept and slope values using JSL?

1 REPLY 1
txnelson
Super User

Re: Fit Special Limits JSL

Here is a saved script using JMP 16, after setting one of the Fits to a Fit Special.  It shows how to specify the required JSL

names default to here(1);
dt=open("$sample_data/big class.jmp");
Bivariate(
	Y( :Age ),
	X( :height ),
	Fit Line( {Confid Curves Indiv( 1 ), Line Color( "Black" )} ),
	Fit Special( Intercept( 0 ), Slope( 1 ), {Line Color( {212, 73, 88} )} ),
	Fit Line( {Line Color( {39, 174, 174} )} ),
	SendToReport(
		Dispatch(
			{},
			"Bivar Plot",
			FrameBox,
			{DispatchSeg( Line Seg( 1 ), {Line Color( "Black" )} ),
			DispatchSeg( Line Seg( 4 ), {Line Color( "Black" )} ),
			DispatchSeg( Line Seg( 5 ), {Line Color( "Black" )} ),
			Row Legend(
				Blade Type,
				Color( 1 ),
				Color Theme( "JMP Default" ),
				Marker( 0 ),
				Marker Theme( "" ),
				Continuous Scale( 0 ),
				Reverse Scale( 0 ),
				Excluded Rows( 0 )
			)}
		),
		Dispatch( {}, "Linear Fit", OutlineBox, {Close( 1 )} ),
		Dispatch( {}, "Linear Fit", Outline Box( 2 ), {Close( 1 )} ),
		Dispatch( {}, "Linear Fit", Outline Box( 3 ), {Close( 1 )} )
	)
);

 

Jim

Recommended Articles