Hi. I'm Jeon.
I'm beginner of JMP.
I want to have a script for making scattorplot Matrix with Items I select.
Could you give me a help with it?
I splited one data table to two data table.
one has value of test items(*Data type : Numeric & Continuous) , another one has upper limit & lower limit.(*Charactor & Norminal)
Column names(=test item names) are the same in 2 different data table.
Two sample data tables are like right below.
With these two, I wanna have a Scatterplot Matrix report like below.
I have some questions.
1.Fixed X Axis(Column#1 Named "Test Name"). but Y Axis will be selected with something like dialog for users. (*Multiple Items)
Since X is fixed, I want to select only Y Items. filter is necessary for finding test items.
2.I want to add referrence line to each Scatterplot Matrix. (*Two referrence line : Upper limit, Low limit.)
3.I want to show only report. not data table.
I add the scriprt I wrote so far. please help me.
dt = Open(
//dt_address,
"C:\Users\admin\Desktop\전\JSL_P\MA1305_PR16_NC_R013_7719110_W02_IPS142858_08182023.csv",
columns(
),
Import Settings(
End Of Line( CRLF, CR, LF ),
End Of Field( Comma, CSV( 1 ) ),
Strip Quotes( 0 ),
Use Apostrophe as Quotation Mark( 0 ),
Use Regional Settings( 0 ),
Scan Whole File( 1 ),
Treat empty columns as numeric( 0 ),
CompressNumericColumns( 0 ),
CompressCharacterColumns( 0 ),
CompressAllowListCheck( 0 ),
Labels( 0 ),
Column Names Start( 1 ),
Data Starts( 47 ),
Lines To Read( "All" ),
Year Rule( "20xx" )
)
);
//delete not used column & Row
dt=Current Data Table ();
dt << Delete Columns( :"Column 2"n, :"Column 3"n, :"Column 4"n, :"Column 5"n);
dt << delete row( 6 );
// dt_item includes Test Number, Lower Limit, Upper Limit, Units.
dt << select rows({1,2,3,4,5}) ;
dt_item = subset( dt );
dt << delete rows( {2,3,4,5} );
//dt3 = dt << subset( Selected Rows( 1 ), Selected columns only( 0 ) );
//dt2 << concatenate( dt3, AppendToFirstTable( 1 ) );
//Fill Coulum with Test Names (*dt)
For( c = 1, c < N Col( dt ), c ++,
Column( dt, c ) << Set Name( Column( dt, c )[1] );
);
//Fill Coulum with Test Names (*dt_item)
For( c = 1, c < N Col( dt_item ), c ++,
Column( dt_item, c ) << Set Name( Column( dt_item, c )[1] );
);
//delete not used column & Row
dt << delete rows( {1} );
dt_item << delete rows( {1} );
//Change Data Type (*dt)
colList = dt << get column names(charater);
For(i=1,i<=n items(colList), i++,
column(dt, colList[i]) << Data Type( Numeric ) << Set Modeling Type( Continuous );
);
///Data pre-processing done.
//Read Test Item & Upper limit & Lower limit.
rowNum = 1;
col = Column( dt_item(), "SPK_RCV_VOS_Post_0p5W");
test_no = col[ rowNum ];
//Read UL
rowNum = 2;
col = Column( dt_item(), "SPK_RCV_VOS_Post_0p5W"); // !!!!!!!!!!I want to select multiple items with dialog and read Upper limit
Upper_limit = col[ rowNum ];
//Read LL
rowNum = 3;
col = Column( dt_item(), "SPK_RCV_VOS_Post_0p5W"); // !!!!!!!!!!I want to select multiple items with dialog and read Lower limit
Lower_limit = col[ rowNum ];
dt << Scatterplot Matrix(
Y( :SPK_RCV_VOS_Post_0p5W ), // !!!!!!!!!!I want to select multiple Y items with dialog. X is Fixed.
X( :Test Name ),
Fit Line( 0 ),
SendToReport(
Dispatch(
{},
"1100",
ScaleBox,
{Add Ref Line( Upper_limit, "Solid", "Red", "ul", 1 ),
Add Ref Line( Lower_limit, "Solid", "Dark BlueCyan", "ll", 1 )} //!!!!!!!!I want to add referrence line with Upper & Lower Limit.
),
Dispatch( {}, "Test Name", TextEditBox, {Set Text( "Site #" )} )
)
);
Thanks.