Search in sources :

Example 1 with Plot

use of net.sf.latexdraw.model.api.shape.Plot in project latexdraw by arnobl.

the class TestParsingPlotCommands method testPsplotNotPolar.

@Test
public void testPsplotNotPolar() {
    parser("\\psplot[polarplot=false]{0}{720}{x sin}");
    final Plot plot = getShapeAt(0);
    assertFalse(plot.isPolar());
}
Also used : Plot(net.sf.latexdraw.model.api.shape.Plot) Test(org.junit.jupiter.api.Test) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Example 2 with Plot

use of net.sf.latexdraw.model.api.shape.Plot in project latexdraw by arnobl.

the class TestParsingPlotCommands method testPsplotStar.

@Test
public void testPsplotStar() {
    parser("\\psplot*[plotpoints=200]{0}{720}{x sin}");
    final Plot plot = getShapeAt(0);
    assertEquals(0d, plot.getPlotMinX(), 0.00001);
    assertEquals(720d, plot.getPlotMaxX(), 0.00001);
    assertEquals("x sin", plot.getPlotEquation());
    assertEquals(FillingStyle.PLAIN, plot.getFillingStyle());
}
Also used : Plot(net.sf.latexdraw.model.api.shape.Plot) Test(org.junit.jupiter.api.Test) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Example 3 with Plot

use of net.sf.latexdraw.model.api.shape.Plot in project latexdraw by arnobl.

the class TestParsingPlotCommands method testPsplotNbPoints.

@Test
public void testPsplotNbPoints() {
    parser("\\psplot[plotpoints=213]{0}{720}{x sin}");
    final Plot plot = getShapeAt(0);
    assertEquals(213, plot.getNbPlottedPoints());
}
Also used : Plot(net.sf.latexdraw.model.api.shape.Plot) Test(org.junit.jupiter.api.Test) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Example 4 with Plot

use of net.sf.latexdraw.model.api.shape.Plot in project latexdraw by arnobl.

the class TestParsingPlotCommands method testPsplot.

@Test
public void testPsplot() {
    parser("\\psplot{0}{720}{x sin}");
    final Plot plot = getShapeAt(0);
    assertEquals(0d, plot.getPlotMinX(), 0.00001);
    assertEquals(720d, plot.getPlotMaxX(), 0.00001);
    assertEquals("x sin", plot.getPlotEquation());
}
Also used : Plot(net.sf.latexdraw.model.api.shape.Plot) Test(org.junit.jupiter.api.Test) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Example 5 with Plot

use of net.sf.latexdraw.model.api.shape.Plot in project latexdraw by arnobl.

the class TestParsingPlotCommands method testPsplotYUnit.

@Test
public void testPsplotYUnit() {
    parser("\\psplot[yunit=0.1]{0}{720}{x sin}");
    final Plot plot = getShapeAt(0);
    assertEquals(0.1, plot.getYScale(), 0.00001);
}
Also used : Plot(net.sf.latexdraw.model.api.shape.Plot) Test(org.junit.jupiter.api.Test) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Aggregations

Plot (net.sf.latexdraw.model.api.shape.Plot)14 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)10 Test (org.junit.jupiter.api.Test)7 Test (org.junit.Test)3 HelperTest (net.sf.latexdraw.HelperTest)2 EnumSource (org.junit.jupiter.params.provider.EnumSource)2 Axes (net.sf.latexdraw.model.api.shape.Axes)1 BezierCurve (net.sf.latexdraw.model.api.shape.BezierCurve)1 Circle (net.sf.latexdraw.model.api.shape.Circle)1 CircleArc (net.sf.latexdraw.model.api.shape.CircleArc)1 Dot (net.sf.latexdraw.model.api.shape.Dot)1 Ellipse (net.sf.latexdraw.model.api.shape.Ellipse)1 Freehand (net.sf.latexdraw.model.api.shape.Freehand)1 Grid (net.sf.latexdraw.model.api.shape.Grid)1 Polygon (net.sf.latexdraw.model.api.shape.Polygon)1 Polyline (net.sf.latexdraw.model.api.shape.Polyline)1 Rectangle (net.sf.latexdraw.model.api.shape.Rectangle)1 Rhombus (net.sf.latexdraw.model.api.shape.Rhombus)1 Square (net.sf.latexdraw.model.api.shape.Square)1 Text (net.sf.latexdraw.model.api.shape.Text)1