I have a JSL script consisting of several buttons. Each button opens a new window with a bivariate time trend with a unique time and legend from my dataset, i.e.
VALUE TIME@A LEGEND@A TIME@B LEGEND@B
--------------------------------------------------------------------------------------------------
10 1 A 2 B
40 2 B 3 C
50 3 A 4 C
30 4 B 5 B
Button #1 opens Value (Y) by Time1 (X), with Legend = Legend1, button #2 opens Value (Y) by Time2 (X), with Legend = Legend2.
In my actual dataset I have much more than 2 time/legend pairs that I need to check - I wanted to know if there's a way in JSL to change the x axis/legend on the same plot with a click of a button, instead of opening a new window every time?
I tried the following just to change the axis, but it doesn't work. Didn't even try changing the legend yet... Thanks in advance!
dt = open("data.jmp");
ColA = Column("TIME@A");
ColB = Column("TIME@B");
nw = new window("NewWin",
hlistbox(
bv = Bivariate(
Y( :Name( "VALUE" ) ),
X( ColA )
),
Button box(
"Change axis",
bv << X( ColB )
)
);
);