Subscribe Bookmark RSS Feed

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

jameskim

Community Trekker

Joined:

May 17, 2012


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" )} ) )
);

7 REPLIES
louv

Staff

Joined:

Jun 23, 2011

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

jameskim

Community Trekker

Joined:

May 17, 2012

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

Joined:

Feb 10, 2013

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" ) ) )

);

jameskim

Community Trekker

Joined:

May 17, 2012

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

Joined:

Feb 10, 2013

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

Community Trekker

Joined:

Oct 7, 2015

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

Community Trekker

Joined:

Sep 11, 2013

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 ) ),