cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
Steve_Kim
Level III

[Script] Get rid of Moving Range chart in control chart builder


Hello~ all~

Is there a way to get rid of Moving Range chart

in the 'Control chart builder' platform

by using JMP script? : )

8761_I chart.jpg

Here is the script for the 'control chart builder' sample.

dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" );

dt << Control Chart Builder(
Show Control Panel( 0 ),
Variables( Subgroup( :Pin ), Y( :Weight ) ),
Chart( Position( 1 ), Limits( Spec Limits( 1 ) ), Warnings( Test 1( 1 ) ) ),
Chart( Position( 2 ) ),
SendToReport( Dispatch( {}, "graph title", TextEditBox, {Set Text( "Individual chart of Weight" )} ) )
);

12 REPLIES 12
louv
Staff (Retired)

Re: [Script] Get rid of Moving Range chart in control chart builder

James,

It is very subtle, if place your cursor on the Y-axis of the Moving range just until the hand is facing up (this is somewhat tricky),  then drag the hand (axis) to the left and the Moving Range chart will disappear.

8764_Screen Shot 2015-05-11 at 2.44.06 AM.png

Steve_Kim
Level III

Re: [Script] Get rid of Moving Range chart in control chart builder

Thank you so much~ LouV,

But my question is ... remove the 'Moving Range chart' by using JMP script...

[1] I'm currently use JMP 11.

    I can click the mouse right button and 'Remove' button to remove it, but there are over 100 control charts.  So I have to use JMP script.


[2] I thought that if I delete the 'Chart (Position (2))' in the script

    , then  I could remove the 2nd control chart which is 'Moving Range chart' but it couldn't. (It feels bug ... Maybe I don't know how to change it )

dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" );

dt << Control Chart Builder( Show Control Panel( 0 ),

          Variables( Subgroup( :Pin ), Y( :Weight ) ),

        Chart( Position( 1 ), Limits( Spec Limits( 1 ) ), Warnings( Test 1( 1 ) ) ),
       Chart( Position( 2 ) ),

        SendToReport( Dispatch( {}, "graph title", TextEditBox, {Set Text( "Individual chart of Weight" )} ) )
);


[3] I know there is a 'IR' menu for I chart

     , but I have to use 'control chart builder' menu  to customize the rule 2. (form 9 to 8 points)

8768_I chart (2).jpg

-----------  or  --------------

Maybe I have to use 'I' chart menu...

adding formula with label funtion for Rule 2 (Marks on the 8points)   (Default : marks from 9points)

KarenC
Super User (Alumni)

Re: [Script] Get rid of Moving Range chart in control chart builder

James,

When I made up an example, removed the MR chart and saved the script I get at "Show Two Shewhart Charts (0)" line of code...if it is set to 1 I get both charts, 0 to get one chart.  The line of code only appeared in the saved script AFTER I manually removed the chart, the joys of JSL?


Karen

Control Chart Builder(

  Show Two Shewhart Charts( 0 ),

  Show Capability( 0 ),

  Variables( Y( :column name ) ),

  Chart( Points( Statistic( "Individual" ) ), Limits( Sigma( "Moving Range" ) ) )

);

Steve_Kim
Level III

Re: [Script] Get rid of Moving Range chart in control chart builder

Hello Karen~~

Thank you for your advice~!

Yes~~  That's it, but it's not working. I dont know why..

I also tried it with other computers, but it doesn't work.  (JMP Version 11.2.1)

(File > Preferences > Platforms > Control Chart Builder :  Inactivate "Show Two Shewhart Chart")

dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" );

dt << Control Chart Builder(

        Show Control Panel( 0 ),

        Show Two Shewhart Charts( 0 ),

        Variables( Subgroup( :Pin ), Y( :Weight ) ),

        Chart(  Points( Statistic( "Individual" ) ),  Limits( Sigma( "User Defined" ), Spec Limits( 1 ) ),  Warnings( Test 1( 1 ), Test 2( 1 ), Test 3( 1 ) ) )

);

KarenC
Super User (Alumni)

Re: [Script] Get rid of Moving Range chart in control chart builder

Don't ask me why, I am just a JSL hack.  Swap the Show Control Panel and Show Two Stewart Chart commands so that the two chart command is first.  That worked for me.


Karen

wendy_o
Level I

Re: [Script] Get rid of Moving Range chart in control chart builder

Karen@boulderstats is correct. If you put the Show Two Shewhart Charts (0) statement first, you'll get the single individuals chart.

Note: If you place that statement second (or beyond) in your chart builder script, you'll get the default of two Shewhart charts (regardless of your preference setting and regardless of whether you put 1 or 0 in the Shewhart line of the script.

jmpbeginner
Level III

Re: [Script] Get rid of Moving Range chart in control chart builder

Thanks Karen!  placing the Show Two Shewhart Charts (0) statement first worked  for me --I also had to remove the reference to Chart Position 2 to get it to work:


delete or comment out this line:

  Chart( Position( 2 ) ),

Paul_J
Level III

Re: [Script] Get rid of Moving Range chart in control chart builder

Thanks for the information on how to remove the mR chart with JSL.  Unfortunately it's not working for me, and anyone has a solution that would be greatly appreciated.  I am using JMP 12.1.0, have placed the TwoCharts(0) first, and taken out the Chart(Position(2)), but am still getting both charts.  Below is the code I am using.  Thanks Again!

 

Control Chart Builder(
Show Two Shewhart Charts(0),
Size( 650, 500 ),
Show Control Panel( 0 ),
Show Capability( 0 ),
Variables( Subgroup( :Batch ), Y( :Peak ) ),
Customize Tests( Test 2( 8, "2" ), Test 3( 7, "3" ) ),
Chart( Position( 1 ),
Points( Statistic( "Individual" ) ),
Limits( Sigma( "Moving Range" ) ),
Warnings( Test 1( 1 ), Test 2( 1 ), Test 3( 1 ) )
)
);

 

txnelson
Super User

Re: [Script] Get rid of Moving Range chart in control chart builder

Here is a script using the Big Class data table, and your script, running in JMP 12.2 and it seems to work great

onechart.PNG

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );


Control Chart Builder(
	Show Two Shewhart Charts( 0 ),
	Size( 650, 500 ),
	Show Control Panel( 0 ),
	Show Capability( 0 ),
	Variables( Subgroup( :age ), Y( :height ) ),
	Customize Tests( Test 2( 8, "2" ), Test 3( 7, "3" ) ),
	Chart(
		Position( 1 ),
		Points( Statistic( "Individual" ) ),
		Limits( Sigma( "Moving Range" ) ),
		Warnings( Test 1( 1 ), Test 2( 1 ), Test 3( 1 ) )
	)
);
Jim