Share your ideas for the JMP Scripting Unsession at Discovery Summit by September 17th. We hope to see you there!
Choose Language Hide Translation Bar
Highlighted
Ksrzg01
Level I

Tab Box Not Populating Correctly

Hi all,

 

I'm trying to create a window which has multiple tabs "Plist" and displays each graph by label. The script works fine but it doesnt show the reference lines (which reference a column) when the script is run. Is there a workaround for the bivariate plots to display these reference lines based on their column value??? Below is my script which I've ran successfully before, but has stopped working. 

 

Thanks!

 

 

Plist = {"Prod1", "Prod2", "Prod3", "Prod4"};
nw = New Window( "test", tb = Tab Box() );
For( y = 1, y <= N Items( Plist ), y++,
	dtflag << Select Where( :product == Plist[y] );
	Try( TempSubDT = dtflag << subset( Selected Rows, invisible ) );
	tb << Append(
		Char( Plist[y] ),
		V List Box(
			TempSubDT << Bivariate(
				SendToByGroup( Bygroup Default ),
				Y( :data ),
				X( :txn_time ),
				Automatic Recalc( 1 ),
				Fit Spline( 1e+18, {Line Color( {212, 73, 88} )}, Report( 0 ) ),
				By( :LABEL ),
				SendToReport(
					Dispatch( 
						{}, "1", ScaleBox, {Interval( "Day" ), Inc( 2 ), Minor Ticks( 0 ), Label Row( Label Orientation( "Angled" ) )} ),
					Dispatch(
						{},
						"2",
						ScaleBox,
						{Min( :LSL - :TGT* 0.1 ), Max( :USL + :TGT* 0.1 ), Add Ref Line( :USL, "Dashed", "Red", "USL", 2 ),
						Add Ref Line( :LSL, "Dashed", "Red", "LSL", 2 ), Add Ref Line( :UCL, "Dashed", "Green", "UCL", 2 ),
						Add Ref Line( :LCL, "Dashed", "Green", "LCL", 2 ), Add Ref Line( :TGT, "Solid", "Black", "Target", 2 )}
					),
					Dispatch( {}, "Bivar Plot", FrameBox, {Frame Size( 650, 300 )} )
				)
			)
		)
	);
);
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
txnelson
Super User

Re: Tab Box Not Populating Correctly

The reference line value needs to point to a single value, rather than a whole column of values, therefore, your Add Ref Line needs to look something like:

Add Ref Line( :USL[1], "Dashed", "Red", "USL", 2 ),
Add Ref Line( :LSL[1], "Dashed", "Red", "LSL", 2 ),
Add Ref Line( :UCL[1], "Dashed", "Green", "UCL", 2 ),
Add Ref Line( :LCL[1], "Dashed", "Green", "LCL", 2 ),
Add Ref Line( :TGT[1], "Solid", "Black", "Target", 2 )
Jim

View solution in original post

2 REPLIES 2
Highlighted
txnelson
Super User

Re: Tab Box Not Populating Correctly

The reference line value needs to point to a single value, rather than a whole column of values, therefore, your Add Ref Line needs to look something like:

Add Ref Line( :USL[1], "Dashed", "Red", "USL", 2 ),
Add Ref Line( :LSL[1], "Dashed", "Red", "LSL", 2 ),
Add Ref Line( :UCL[1], "Dashed", "Green", "UCL", 2 ),
Add Ref Line( :LCL[1], "Dashed", "Green", "LCL", 2 ),
Add Ref Line( :TGT[1], "Solid", "Black", "Target", 2 )
Jim

View solution in original post

Highlighted
Ksrzg01
Level I

Re: Tab Box Not Populating Correctly

Ah this worked perfectly! Thanks Nelson!

Article Labels

    There are no labels assigned to this post.