use of net.sf.latexdraw.model.api.shape.Plot in project latexdraw by arnobl.
the class TestPlot method testDuplicate.
@Test
public void testDuplicate() {
shape.setPlotEquation("2 x mul");
shape.setPolar(true);
shape.setNbPlottedPoints(73);
shape.setPlotStyle(PlotStyle.ECURVE);
shape.setPlotMinX(-234.0);
shape.setPlotMaxX(123.0);
shape.setDotStyle(DotStyle.BAR);
shape.setDiametre(23.0);
shape.setDotFillingCol(DviPsColors.YELLOW);
shape.setPlotEquation("x");
final Plot plot = shape.duplicate();
assertEquals("x", plot.getPlotEquation());
assertTrue(plot.isPolar());
assertEquals(DviPsColors.YELLOW, plot.getDotFillingCol());
assertEquals(23.0, plot.getDiametre(), 0.0001);
assertEquals(DotStyle.BAR, plot.getDotStyle());
assertEquals(123.0, plot.getPlotMaxX(), 0.0001);
assertEquals(-234.0, plot.getPlotMinX(), 0.0001);
assertEquals(PlotStyle.ECURVE, plot.getPlotStyle());
assertEquals(73, plot.getNbPlottedPoints());
}
use of net.sf.latexdraw.model.api.shape.Plot in project latexdraw by arnobl.
the class TestParsingPlotCommands method testPsplotXUnit.
@Test
public void testPsplotXUnit() {
parser("\\psplot[xunit=0.1]{0}{720}{x sin}");
final Plot plot = getShapeAt(0);
assertEquals(0.1, plot.getXScale(), 0.00001);
}
use of net.sf.latexdraw.model.api.shape.Plot in project latexdraw by arnobl.
the class TestParsingPlotCommands method testPsplotPlotStyle.
@ParameterizedTest
@EnumSource(value = PlotStyle.class)
public void testPsplotPlotStyle(final PlotStyle style) {
parser("\\psplot[plotstyle=" + style.getPSTToken() + "]{0}{720}{x sin}");
final Plot plot = getShapeAt(0);
assertEquals(style, plot.getPlotStyle());
}
use of net.sf.latexdraw.model.api.shape.Plot in project latexdraw by arnobl.
the class TestParsingPlotCommands method testPsplotPolar.
@Test
public void testPsplotPolar() {
parser("\\psplot[polarplot=true]{0}{720}{x sin}");
final Plot plot = getShapeAt(0);
assertTrue(plot.isPolar());
}
Aggregations