Hello everyone
I am trying to script a report for plotting bivariate plot with local data filter that enables the user to choose specific 'product' and show the line that corresponds to it.
I used a ready script and tried to adapt it to my data, but it did not work - the bivariate plot shows up but when i click on different tabs, nothing happens - the plot stays static.
Hope you can help!
Thanks
JSL script:
Names Default To Here(1);
dt = Current Data Table(); // Assuming the data table is open
dt << Select Where(Is missing(:"PRODUCT@STARTS")) << Delete Rows;
summarize(unique_values=by("PRODUCT@STARTS"));
bivExpr = expr(
Bivariate(
Y(:Name(
"SPCRAW@WAFER@MEAN@ONTFE.HM_FRAC_LOT_2PT_DYN.74.DER@ML=2PT_DYN_A;PP=2PT_MEAN@188426"
)
),
X(:Name( "END_TIME@CHAMBER@NTSC@Process-1@ETCHER@163096" ) ),
//By( cat<< Get Selected ),
GroupBy( :group ),
Fit Spline( 0.1, Standardized, {Line Width( 2 )} ),
UnGroup;
Fit Where(:group == "D1D",
Fit Spline(0.1,Standardized,{Line Color( "Black" ), Line Width( 4 )}));
Local Data Filter(
Show Histograms and Bars( 0 ),
Add Filter(
columns( :Name("PRODUCT@STARTS" )),
Display( :Name("PRODUCT@STARTS"), N Items( 2 ) )
)
)
);
);
nw = new window("Tabbed analyses",
tb = tabbox()
);
for(i=1, i<=nitems(unique_values), i++,
tb << append(
unique_values[i],
vlistbox(eval(substitute(nameexpr(bivExpr), expr(_TYPE_), unique_values[i])))
)
);If I interpret the ask correctly, it sounds like you want to be able to select subsets of your data and have the linear regression shown for that subset (or multiple subsets). In that case, a combination of Local Data Filter and Group By in the bivariate platform will accomplish this, but in the example you show you are using different columns for Group By and Local Data Filter. If you use the same column for both, it seems like that would accomplish the ask, unless I'm missing something.