use of com.twosigma.beakerx.chart.xychart.plotitem.Area in project beakerx by twosigma.
the class GroovyEvaluatorChartTest method parsePlotWithAreaScript_returnPlotObjectWithArea.
@Test
public void parsePlotWithAreaScript_returnPlotObjectWithArea() {
// when
Object result = parseClassFromScript("def plot = new Plot()\n" + "def ys = [3, 5, 2, 3]\n" + "def xs = [0, 1, 2, 3]\n" + "plot << new Area(x: xs, y: ys)");
// then
Assertions.assertThat(result instanceof Plot).isTrue();
Plot plot = (Plot) result;
Assertions.assertThat(plot.getGraphics()).isNotEmpty();
Assertions.assertThat(plot.getGraphics().get(0) instanceof Area).isTrue();
}
use of com.twosigma.beakerx.chart.xychart.plotitem.Area in project beakerx by twosigma.
the class BasedXYGraphicsSerializerTest method initTestStubData.
@Before
public void initTestStubData() throws IOException {
sw = new StringWriter();
jgen = mapper.getJsonFactory().createJsonGenerator(sw);
area = new Area();
area.setX(Arrays.asList(1, 2, 3));
area.setY(Arrays.asList(1, 2, 3));
}
use of com.twosigma.beakerx.chart.xychart.plotitem.Area in project beakerx by twosigma.
the class PlotTest method initStubData.
@Before
public void initStubData() {
plot = new Plot();
line = new Line();
line.setX(Arrays.asList(1, 2, 3));
line.setY(Arrays.asList(2, 3, 4));
area = new Area();
area.setX(Arrays.asList(1, 2, 3));
area.setY(Arrays.asList(2, 3, 4));
}
use of com.twosigma.beakerx.chart.xychart.plotitem.Area in project beakerx by twosigma.
the class AreaSerializerTest method initTestStubData.
@Before
public void initTestStubData() throws IOException {
sw = new StringWriter();
jgen = mapper.getJsonFactory().createJsonGenerator(sw);
area = new Area();
area.setX(Arrays.asList(1, 2, 3));
area.setY(Arrays.asList(1, 2, 3));
}
Aggregations