I'm trying to make a graphbox that uses the functionality of data filter context box. But it doesn't seem to be working? I thought maybe I could have my graphics script mess with an invisible local data filter, but I'm wondering if there's a more straight forward approach.
names default to here(1);
dt = open("$SAMPLE_DATA\Big Class.jmp");
gb = graphbox();
new window("Test",
data filter context box(
hlistbox(
data filter source box(gb),
platform(dt, bivariate(Y(:height), X(:weight))) // I want this to data filter instead of just selecting
)
)
);
fb = gb[framebox(1)];
fb << Add graphics script(
mousetrap(exx = x;
eyy = y;
,
sel_age = 10;
if(abs(exx-20) < 2,
sel_age = 13,
abs(exx-40) < 2,
sel_age = 14,
abs(exx-60) < 2,
sel_age = 15,
abs(exx-80) < 2,
sel_age = 16,
sel_age = 17
);
show(sel_age);
rows = dt << Get Rows Where(dt:age == sel_age);
print(rows);
dt << clear select;
dt << Select Rows(rows);
);
);