Subscribe Bookmark RSS Feed

Un-Connected Point on Control Chart

pauljames1

Community Trekker

Joined:

Feb 24, 2015

On a control chart, how can I show an excluded point without having it connected by a line to the non-excluded points?

6 REPLIES
Jeff_Perkinson

Community Manager

Joined:

Jun 23, 2011

Unfortunately, that's not currently possible.

I'll note the request and we'll consider it for an enhancement in a future release.

-Jeff

-Jeff
pauljames1

Community Trekker

Joined:

Feb 24, 2015

Jeff,

Thanks for getting back to me. I expected as such. We’ve actually gotten around that with a script that extracts the control limits from column properties, then uses graph builder to plot to Y variables, one with points and a line, the other with just points, with the control limits inserted as reference lines.

Regards,

Paul

ms

Super User

Joined:

Jun 23, 2011

Another possible workaround could be to use a graphics script to show the excluded points. An example:

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

// Hide and exclude some rows

dt << select rows([13, 17]) << exclude << hide << clear select();

cc = dt << Control Chart(Sample Size(1), Chart Col(:Weight, Run Chart()), );

//Add markers for the excluded data

r = dt << get excluded rows;

Eval(Eval Expr(Report(cc)[Framebox(1)] << add graphics script(Marker(Expr(r), Expr(:Weight[r])))));

pauljames1

Community Trekker

Joined:

Feb 24, 2015

Thanks! That was helpful, but two things come to mind … First, is there a way to use as logical expression to select the rows to hide based on values of another column? Second, I’ve discovered I did not completely specify my question (sorry about that)! I also wanted to show the excluded points with a different symbol, so is there a way to add something to the script that changes the marker for those excluded points?

PS., I was going to post this as another reply, but it seems there are “no actions available” on my discussion.

ms

Super User

Joined:

Jun 23, 2011

Both should be possible. See updated example code below:

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

// Get axis limits before excluding data

cc = dt << Control Chart(Sample Size(1), Chart Col(:Weight, Run Chart()), invisible);

ymin = Report(cc)[AxisBox(1)] << get min;

ymax = Report(cc)[AxisBox(1)] << get max;

cc << close window();

//Exclude points with |z-score|>2;

dt << select where(Abs(Col Standardize(:Weight)) > 2) << exclude << clear select();

//Make plot and restore axis settings

cc = dt << Control Chart(Sample Size(1), Chart Col(:Weight, Run Chart()));

Report(cc)[AxisBox(1)] << Min(ymin) << Max(ymax);

//Add markers for the excluded data

r = dt << get excluded rows;

Eval(

    Eval Expr(

        Report(cc)[Framebox(1)] << add graphics script(Marker(Marker State(2), Color State("red"), Expr(r), Expr(:Weight[r])))

    )

);


pauljames1

Community Trekker

Joined:

Feb 24, 2015

Thanks!  Both script code options helped a lot!