Subscribe Bookmark RSS Feed

Marking outliers in a histogram with an entry from one of other columns

asvp

Community Trekker

Joined:

Jun 23, 2011

Hi,

I have a table with multiple columns say X,Y,Z. If I plot a histogram of Z and want to
mark all outliers with row entries of X instead of just row number, is this possible using JSL?

Thanks,
ASVP
4 REPLIES
Do you want to do something that the built-in row labeling won't do?

For example, open Big Class.jmp from the Sample Data directory, and do a histogram of weight. You'll not there's one outlier on the top. If you right-click on that outlier and select "Row Label", you get the name LAWRENCE, the corresponding value from the name column.

This is done by assigning the Label role to the name column (which was done already for this data table). If you want to use X and Y (of your example) as labels to column Z, select X and Y, then Cols > Label/Unlabel. From then on, in every plot, you'll have points labeled by X,Y.

But I think I am misunderstanding your question. Do you want JMP to automatically label all outliers?
asvp

Community Trekker

Joined:

Jun 23, 2011

Hi Rastignac,

Thanks for your response, I can follow your procedure to manually label points but
I would like the script to do this labeling automatically for all Z values greater than a defined
threshold. Is this possible using JSL?

Regards,
ASVP
ASVP,

What you're looking for is a combination of the For Each Row() loop and the Row State() statement.

Here's a simple JSL program, again in Big Class:

Bivariate(Y(height), X(weight));
For Each Row(
If( height > 68, Row State() = Labeled State( 1 )
)
)

This draws a scatter plot and labels anything with a height greater than 68. You can make the condition for labeling anything you want.

It works for Distribution, too, as long as the points are plotted as outliers:

Distribution(Y(height));
For Each Row(
If( height < 53, Row State() = Labeled State( 1 )
)
)

Unfortunately, I don't think there's a way to alter JMP's determination of what is an outlier in the Distribution platform.
asvp

Community Trekker

Joined:

Jun 23, 2011

Thanks Rastignac, this works for me. As you have mentioned, If I use it for distribution then I can only mark the outliers as defined by JMP.

Thanks for your help.

Regards,
-ASVP