barsPlot = new Plot(useToolTip: false);
barsPlot << new Bars(x: (1..5), y: [5, 2, 4, 3, 7], )
.onKey(KeyboardCodes.SHIFT, {info -> info.graphics.y[info.index]++})
.onKey("T", "tag1")
.onKey("U", {info -> info.graphics.y[info.index]--;
beakerx.runByTag("tag1")
})
def details = barsPlot.details
def item = details.graphics
def index = details.index
println (item.x[index] + ":" + item.y[index])
barsPlot2 = new Plot(useToolTip: false);
barsPlot2 << new Bars(x: (1..5), y: [5, 2, 4, 3, 7], )
.onClick({info -> info.graphics.y[info.index]++;
beakerx.runByTag("tag2")
})
def details2 = barsPlot2.details
def item2 = details2.graphics
def index2 = details2.index
println (item2.x[index2] + ":" + item2.y[index2])
barsPlot3 = new Plot(useToolTip: false);
barsPlot3 << new Bars(x: (1..5), y: [5, 2, 4, 3, 7], ).onClick("tag3")
def details3 = barsPlot3.details
def item3 = details3.graphics
def index3 = details3.index
println (item3.x[index3] + ":" + item3.y[index3])
barsPlot4 = new Plot(useToolTip: false);
barsPlot4 << new Bars(x: (1..5), y: [12, 6, 8, 4, 8], )
cplot5 = new CombinedPlot()
def plot5_1 = new Plot(useToolTip: false);
plot5_1 << new Bars(x: (1..5), y: [5, 2, 4, 3, 7]).onClick({info -> info.graphics.y[info.index]++;})
cplot5.add(plot5_1)
def plot5_2 = new Plot(useToolTip: false);
plot5_2 << new Bars(x: (1..5), y: [12, 6, 8, 4, 8], color: new Color(200, 55, 55)).onClick("tag52")
cplot5.add(plot5_2)
println (cplot5.subplots[1])
cplot6 = new CombinedPlot()
def plot6_1 = new Plot(useToolTip: false);
plot6_1 << new Bars(x: (1..5), y: [12, 6, 8, 4, 8])
.onClick({info -> info.graphics.y[info.index]--; beakerx.runByTag("tag61"); })
cplot6.add(plot6_1)
def plot6_2 = new Plot(useToolTip: false);
plot6_2 << new Bars(x: (1..5), y: [5, 2, 4, 3, 7], color: new Color(55, 200, 55))
.onClick({ beakerx.runByTag("tag62"); })
cplot6.add(plot6_2)
def details61 = cplot6.subplots[0].details
def item61 = details61.graphics
def index61 = details61.index
println (item61.x[index61] + ":" + item61.y[index61])
println (cplot6.subplots[1])
cplot7 = new CombinedPlot()
def plot7_1 = new Plot(useToolTip: false);
plot7_1 << new Bars(x: (1..5), y: [5, 2, 4, 3, 7]).onKey(KeyboardCodes.SHIFT, { info -> info.graphics.y[info.index]++; })
cplot7.add(plot7_1)
def plot7_2 = new Plot(useToolTip: false);
plot7_2 << new Bars(x: (1..5), y: [12, 6, 8, 4, 8], color: new Color(200, 55, 55)).onKey("T", "tag72")
cplot7.add(plot7_2)
println (cplot7.subplots[1])
cplot8 = new CombinedPlot()
def plot8_1 = new Plot(useToolTip: false);
plot8_1 << new Bars(x: (1..5), y: [12, 6, 8, 4, 8])
.onKey(KeyboardCodes.SHIFT,{info -> info.graphics.y[info.index]--; beakerx.runByTag("tag81"); })
cplot8.add(plot8_1)
def plot8_2 = new Plot(useToolTip: false);
plot8_2 << new Bars(x: (1..5), y: [5, 2, 4, 3, 7], color: new Color(55, 200, 55))
.onKey("U", { beakerx.runByTag("tag82"); })
cplot8.add(plot8_2)
def details81 = cplot8.subplots[0].details
def item81 = details81.graphics
def index81 = details81.index
println (item81.x[index81] + ":" + item81.y[index81])
println (cplot8.subplots[1])