Subscribe Bookmark RSS Feed

How to mark specific data row location in its histogram?

wunglish

Community Trekker

Joined:

Mar 15, 2016

Hello Expertise

I'd like to mark specific data row's location on its histogram as shown in below pic.

I know how to do it manually. I am looking for automatic way just by selecting or marking the data row, it marks the value position on it histogram.

Any good idea on this?

11143_pastedImage_0.png

Thank you

Wung

3 REPLIES
ian_jmp

Staff

Joined:

Jun 23, 2011

One option is to add a reference line to the axis:

Names Default To Here( 1 );

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

// Make a histogram of 'height'

dist = dt << Distribution( Continuous Distribution( Column( :height ) ), Histograms Only );

// Pick a random row

hVal = Column(dt, "height")[RandomInteger(1, NRow(dt))];

// Add a reference line

dist << SendToReport(Dispatch({"height"}, "1", ScaleBox, {Add Ref Line( hVal, "Solid", "Red", "", 1 )}));

You could put the line 'in front of' the histogram if needed.

wunglish

Community Trekker

Joined:

Mar 15, 2016

Hello Ian

Thank you very much. I thought there is a way without making custom script.

Anyway, this script is using random selection. Is there any way to insert dialog box which is asking to key in "name" and "sex"  and so on instead of random selection?

Thank you

JWJEONG

r23426

Community Trekker

Joined:

Jul 3, 2014

Hi

This is what I am using to get a dataset name for saving after i create it.

It should give you some direction on how to do in your case:

// get dataset name after files stacked

New Window("Text Edit Box",

                <<Modal,

                V List Box(

                            Text Box("\!r Enter a dataset name:\!r\!r"),

                            str1=Text Edit Box("Data_stacked"),

                            Text Box ("\!rSelect if data are:\!r"),

                            Panel Box("",

                                        rb_box1 = Radio Box( {"Site level", "Wafer level"} )

                                     ),

                            Text Box ("\!r\!r")                   

                          ),

                Button Box("OK",

                            dataset_name = str1 << Get text;

                            data_type = rb_box1 << Get ;    

                          ),

        );

show(dataset_name, data_type);

Print("dataset name will be:" || dataset_name); // returns variables after window closes