- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Adjusting variables on Graph builder automatically
Hi All,
I have created a final table which has a bunch of columns. The data I want to plot start from 35th column every time. The number of columns I want to plot keeps varyign with every iteration. It could vary from 1 column to many columns.
What is the best way to plot with variables continuously changing?
Is there a way to change the type of plot using an external variable like "plot_type" saying Linear or box?
Is there a way to change the log or linear plot with every iteration using a similar idea?
Below is an example with 5 columns. It doesn't work with any other number of columns.
collist = tdt << get column names();
Show( collist );
m = {};
b = 1;
For( z = 35, z <= N Cols( tdt ), z++,
m[b] = Char( collist[z] );
b = b + 1;
);
Show( m );
gbfc = tdt << Graph Builder(
Size( 1515, 922 ),
Show Control Panel( 0 ),
Variables(
X( :Index ),
X( :Name, Position( 1 ) ),
X( :Wafers, Position( 1 ) ),
Y( Column( tdt, m[1] ) ),
Y( Column( tdt, m[2] ), Position( 1 ) ),
Y( Column( tdt, m[3] ), Position( 1 ) ),
Y( Column( tdt, m[4] ), Position( 1 ) ),
Y( Column( tdt, m[5] ), Position( 1 ) )
),
Elements( Points( X( 1 ), Y( 1 ), Y( 2 ), Y( 3 ), Y( 4 ), Y( 5 ), Legend( 18 ) ) ),
SendToReport( Dispatch( {}, "X title", TextEditBox, {Set Text( "Index / Lot / Wafers" )} ) )
);
Thank you so much.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Adjusting variables on Graph builder automatically
Here is an example of how to accomplish the dynamic plotting.
Names Default To Here( 1 );
tdt = Open( "$SAMPLE_DATA\semiconductor capability.jmp" );
m = {};
b = 1;
collist = tdt << get column names();
For( z = 35, z <= N Cols( tdt ), z++,
m[b] = Char( collist[z] );
b = b + 1;
);
TheExpr =
"gbfc = tdt << Graph Builder(
Size( 1515, 922 ),
Show Control Panel( 0 ),
Variables(
X( :Wafer ),
Y( Column( tdt, m[1] ) )";
For( i = 2, i <= 5, i++,
TheExpr = TheExpr || ",Y( Column( tdt, m[" || Char( i ) || "] ), Position( 1 ) )";
);
TheExpr = TheExpr ||
"),Elements( Points( X( 1 ), Y( 1 ), Y( 2 ), Y( 3 ), Y( 4 ), Y( 5 ), Legend( 18 ) ) ),
SendToReport( Dispatch( {}, \!"X title\!", TextEditBox, {Set Text( \!"Index / Lot / Wafers\!" )} ) )
);";
Eval( Parse( TheExpr ) );
Concerning the changing of the type of plot or the axis values, JSL will allow you to structure any of these items.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Adjusting variables on Graph builder automatically
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Adjusting variables on Graph builder automatically
After Jim's script, you can further control the axes like this
outline = report(gbfc);
yaxis = outline[axisbox(2)];
yaxis<<min(-100);
yaxis<<max(60);
I use the outline's gray open/close triangle->right-click->Edit->ShowTreeStructure to discover axisbox 2 is the Y axis:
Pick ShowTree Structure from the outline. Then click part of the report to find it.
Then I use the scripting index to look up AxisBox
Using the scripting index to find messages for an AxisBox