Plots Update Seamlessly

After a BeakerX Plot has been displayed, you can interact with it with the mouse. You can also interact with it by API, and the plot will update seamlessly in its previously displayed location.

In [ ]:
plot = new Plot(title: "Setting line properties", initHeight: 100)
def ys = [0, 1, 6, 5, 2, 8]
def ys2 = [0, 2, 7, 6, 3, 8]
plot << new Line(y: ys, width: 10, color: Color.red)
plot << new Line(y: ys, width: 3, color: Color.yellow)
In [ ]:
plot.setTitle("Changed Title");
OutputCell.HIDDEN
In [ ]:
plot.setInitWidth(500)
OutputCell.HIDDEN
In [ ]:
plot.setInitHeight(200);
OutputCell.HIDDEN
In [ ]:
plot << new Line(y: [5, 0], x: [0, 5], style: StrokeType.LONGDASH)
OutputCell.HIDDEN
In [ ]:
ch = new Crosshair(color: new Color(255, 128, 5), width: 2, style: StrokeType.DOT)
plot.setCrosshair(ch)
OutputCell.HIDDEN
In [ ]: