cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
Sebastienlg
Level II

JMP SCRIPT: problem on the X scale with less than 10 values

Hi everyone,

I am making a P' chart of Laney with JMP 16.2. (I know that this chart is available with the new JMP version, however I have not this new version).

I don't know why bur when I have less than 10 values, the X scale is not adapted. 

The X scale is set up for 10 values (whatever the number of values if it is lower than 10), and when I have more than 10 values the X scale is being adapted.

Here is my program

z_yyy = Eval( {:"Y"n} );
		z_xx = z_yyy[1] << get values;
		z_nnn = Eval( {:Nombre de seringue transmise par le remplissage} );
		z_nn = z_nnn[1] << get values;
		z_rrr = Eval( {:Numéro de lot} );

		z_Proportion = E Div( z_xx, z_nn );
		z_Pbar = V Sum( z_xx ) / V Sum( z_nn );
		z_sigma_est = Root( z_Pbar * (1 - z_Pbar) );
		z_zvalue = E Mult( ((z_Proportion - z_Pbar) / z_sigma_est), Root( z_nn ) );
		z_nr = N Row( z_zvalue );
		z_mRList = {0};
		z_m = z_zvalue;
		z_m[1, 0] = [];
		z_m = z_m |/ [0];
		z_mr = Abs( z_m - z_zvalue );
		z_nr = N Row( z_mr );
		z_mr[z_nr, 0] = [];
		z_SigmaZ = Mean( z_mr ) / 1.128;
		z_KSigmaZ = 3 * z_SigmaZ;
		
		
	Names Default To Here( 1 );
	Graph_expr=Expr(
		graph1 = Control Chart(
				Sample Label( :X ),
				Sample Size( :Y2 ),
				KSigma(TBD),
				Sort by Row Order( 1 ),
			Chart Col( :"Y"n, P( Test Beyond Limits( 1 ), Limits Precision( 1 ) ) ),
	SendToReport(
		Dispatch(
			{},
			"Y",
			OutlineBox,
			{Set Title( "Carte de controle P'" )}
		),
		Dispatch(
			{"Y"},
			"2",
			ScaleBox,
			{Format( "Fixed Dec", 12, 5 ), Min( -0.05 ), Max( 1.05 ), Inc( 0.1 ),
			Minor Ticks( 9 )}
		),
		Dispatch(
			{"Y"},
			"1",
			ScaleBox,
			{Min( 0.5 ), Inc( 1 ), Minor Ticks( 0 )}
		),
		Dispatch(
			{"Y"},
			"",
			AxisBox,
			{Add Axis Label( "XX" )}
		)
		)));
	SubstituteInto(Graph_expr, Expr(TBD), z_KSigmaZ);
	Graph_expr;
			
		);		
	)

Is anyone have a suggestion to help me?

Thank you

Sebastien

4 REPLIES 4
Craige_Hales
Super User

Re: JMP SCRIPT: problem on the X scale with less than 10 values

Can you add a sample table and some instructions? And make sure the JSL is clean; the last two parens seem out-of-place.

(I don't use control charts, but I might guess that the Y2 variable for sample size is somehow involved.)

Craige
Sebastienlg
Level II

Re: JMP SCRIPT: problem on the X scale with less than 10 values

Here is an example of the dataset:

XY2Y
A2521824218
B2600024218
C6153456379
D2521824218
E2521824057

I don't think it is a problem of dataset / Y2 variable / parens...

Craige_Hales
Super User

Re: JMP SCRIPT: problem on the X scale with less than 10 values

Are you asking about the large empty region at the right of the graph?

extra space at right end of X axis?extra space at right end of X axis?

It does seem to have a scrolling behavior that might be trying to show about 10 as more rows are added to the table. If you don't get other answers here, try the tech support link at the bottom of the page.

 

dt = 

New Table( "Imported Data", 
	New Column( "X", Character, "Nominal", Set Values( {"A", "B", "C", "D", "E"} ) ),
	New Column( "Y2", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [9, 9, 9, 9, 9] ) ),
	New Column( "Y", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [8, 7, 6, 5, 4] ) )
);
//New Table( "Imported Data", 
//	New Column( "X", Character, "Nominal", Set Values( {"A", "B", "C", "D", "E", "f", "g", "h", "i", "j", "k"} ) ),
//	New Column( "Y2", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9] ) ),
//	New Column( "Y", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [8, 7, 6, 5, 4, 8, 7, 6, 5, 4, 3] ) )
//);

dt << Control Chart(
	Sample Label( :X ),
	Sample Size( :Y2 ),
	KSigma( 1 ),
	Sort by Row Order( 1 ),
	Chart Col( :"Y"n, P( Test Beyond Limits( 1 ), Limits Precision( 1 ) ) )
);

 

Craige
Sebastienlg
Level II

Re: JMP SCRIPT: problem on the X scale with less than 10 values

I tried by creating another datatable but does not work as well...

I do not know why it happens.

Anyone has another suggestion?