Examples of FastScatterPlot


Examples of org.jfree.chart.plot.FastScatterPlot

        try {
            float[][] data = createData();

            ValueAxis domainAxis = new NumberAxis("X");
            ValueAxis rangeAxis = new NumberAxis("Y");
            FastScatterPlot plot = new FastScatterPlot(data, domainAxis,
                    rangeAxis);
            JFreeChart chart = new JFreeChart(plot);
            /* BufferedImage image = */ chart.createBufferedImage(300, 200,
                    null);
            success = true;
View Full Code Here

Examples of org.jfree.chart.plot.FastScatterPlot

    /**
     * Some checks for the equals() method.
     */
    public void testEquals() {

        FastScatterPlot plot1 = new FastScatterPlot();
        FastScatterPlot plot2 = new FastScatterPlot();
        assertTrue(plot1.equals(plot2));
        assertTrue(plot2.equals(plot1));

        plot1.setPaint(new GradientPaint(1.0f, 2.0f, Color.red,
                3.0f, 4.0f, Color.yellow));
        assertFalse(plot1.equals(plot2));
        plot2.setPaint(new GradientPaint(1.0f, 2.0f, Color.red,
                3.0f, 4.0f, Color.yellow));
        assertTrue(plot1.equals(plot2));

        plot1.setDomainGridlinesVisible(false);
        assertFalse(plot1.equals(plot2));
        plot2.setDomainGridlinesVisible(false);
        assertTrue(plot1.equals(plot2));

        plot1.setDomainGridlinePaint(new GradientPaint(1.0f, 2.0f, Color.blue,
                3.0f, 4.0f, Color.yellow));
        assertFalse(plot1.equals(plot2));
        plot2.setDomainGridlinePaint(new GradientPaint(1.0f, 2.0f, Color.blue,
                3.0f, 4.0f, Color.yellow));
        assertTrue(plot1.equals(plot2));

        Stroke s = new BasicStroke(1.5f);
        plot1.setDomainGridlineStroke(s);
        assertFalse(plot1.equals(plot2));
        plot2.setDomainGridlineStroke(s);
        assertTrue(plot1.equals(plot2));

        plot1.setRangeGridlinesVisible(false);
        assertFalse(plot1.equals(plot2));
        plot2.setRangeGridlinesVisible(false);
        assertTrue(plot1.equals(plot2));

        plot1.setRangeGridlinePaint(new GradientPaint(1.0f, 2.0f, Color.green,
                3.0f, 4.0f, Color.yellow));
        assertFalse(plot1.equals(plot2));
        plot2.setRangeGridlinePaint(new GradientPaint(1.0f, 2.0f, Color.green,
                3.0f, 4.0f, Color.yellow));
        assertTrue(plot1.equals(plot2));

        Stroke s2 = new BasicStroke(1.5f);
        plot1.setRangeGridlineStroke(s2);
        assertFalse(plot1.equals(plot2));
        plot2.setRangeGridlineStroke(s2);
        assertTrue(plot1.equals(plot2));

        plot1.setDomainPannable(true);
        assertFalse(plot1.equals(plot2));
        plot2.setDomainPannable(true);
        assertTrue(plot1.equals(plot2));

        plot1.setRangePannable(true);
        assertFalse(plot1.equals(plot2));
        plot2.setRangePannable(true);
        assertTrue(plot1.equals(plot2));

    }
View Full Code Here

Examples of org.jfree.chart.plot.FastScatterPlot

    /**
     * Some tests for the data array equality in the equals() method.
     */
    public void testEquals2() {
        FastScatterPlot plot1 = new FastScatterPlot();
        FastScatterPlot plot2 = new FastScatterPlot();
        assertTrue(plot1.equals(plot2));
        assertTrue(plot2.equals(plot1));

        float[][] a = new float[2][];
        float[][] b = new float[2][];
        plot1.setData(a);
        assertFalse(plot1.equals(plot2));
        plot2.setData(b);
        assertTrue(plot1.equals(plot2));

        a[0] = new float[6];
        assertFalse(plot1.equals(plot2));
        b[0] = new float[6];
View Full Code Here

Examples of org.jfree.chart.plot.FastScatterPlot

    /**
     * Confirm that cloning works.
     */
    public void testCloning() {
        FastScatterPlot p1 = new FastScatterPlot();
        FastScatterPlot p2 = null;
        try {
            p2 = (FastScatterPlot) p1.clone();
        }
        catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        assertTrue(p1 != p2);
        assertTrue(p1.getClass() == p2.getClass());
        assertTrue(p1.equals(p2));
    }
View Full Code Here

Examples of org.jfree.chart.plot.FastScatterPlot

     */
    public void testSerialization() {
        float[][] data = createData();
        ValueAxis domainAxis = new NumberAxis("X");
        ValueAxis rangeAxis = new NumberAxis("Y");
        FastScatterPlot p1 = new FastScatterPlot(data, domainAxis, rangeAxis);
        FastScatterPlot p2 = null;

        try {
            ByteArrayOutputStream buffer = new ByteArrayOutputStream();
            ObjectOutput out = new ObjectOutputStream(buffer);
            out.writeObject(p1);
View Full Code Here

Examples of org.jfree.chart.plot.FastScatterPlot

        try {
            float[][] data = createData();

            ValueAxis domainAxis = new NumberAxis("X");
            ValueAxis rangeAxis = new NumberAxis("Y");
            FastScatterPlot plot = new FastScatterPlot(data, domainAxis,
                    rangeAxis);
            JFreeChart chart = new JFreeChart(plot);
            /* BufferedImage image = */ chart.createBufferedImage(300, 200,
                    null);
            success = true;
View Full Code Here

Examples of org.jfree.chart.plot.FastScatterPlot

  }

  public void run() {
    finished = false;
    populateData();
    FastScatterPlot fastscatterplot = new FastScatterPlot(data,
        new NumberAxis("X"), new NumberAxis("Y"));
    JFreeChart jfreechart = new JFreeChart("Fast Scatter Plot Timing",
        JFreeChart.DEFAULT_TITLE_FONT, fastscatterplot, true);
    BufferedImage bufferedimage = new BufferedImage(400, 300, 1);
    java.awt.Graphics2D graphics2d = bufferedimage.createGraphics();
View Full Code Here

Examples of org.jfree.chart.plot.FastScatterPlot

    /**
     * Test the equals() method.
     */
    public void testEquals() {
       
        FastScatterPlot plot1 = new FastScatterPlot();
        FastScatterPlot plot2 = new FastScatterPlot();
        assertTrue(plot1.equals(plot2));   
        assertTrue(plot2.equals(plot1));
       
        plot1.setPaint(Color.yellow);
        assertFalse(plot1.equals(plot2));
        plot2.setPaint(Color.yellow);
        assertTrue(plot1.equals(plot2));
       
        plot1.setDomainGridlinesVisible(false);
        assertFalse(plot1.equals(plot2));
        plot2.setDomainGridlinesVisible(false);
        assertTrue(plot1.equals(plot2));
       
        plot1.setDomainGridlinePaint(Color.red);
        assertFalse(plot1.equals(plot2));
        plot2.setDomainGridlinePaint(Color.red);
        assertTrue(plot1.equals(plot2));
       
        Stroke s = new BasicStroke(1.5f);
        plot1.setDomainGridlineStroke(s);
        assertFalse(plot1.equals(plot2));
        plot2.setDomainGridlineStroke(s);
        assertTrue(plot1.equals(plot2));
       
        plot1.setRangeGridlinesVisible(false);
        assertFalse(plot1.equals(plot2));
        plot2.setRangeGridlinesVisible(false);
        assertTrue(plot1.equals(plot2));
       
        plot1.setRangeGridlinePaint(Color.red);
        assertFalse(plot1.equals(plot2));
        plot2.setRangeGridlinePaint(Color.red);
        assertTrue(plot1.equals(plot2));
       
        Stroke s2 = new BasicStroke(1.5f);
        plot1.setRangeGridlineStroke(s2);
        assertFalse(plot1.equals(plot2));
        plot2.setRangeGridlineStroke(s2);
        assertTrue(plot1.equals(plot2));
       
    }
View Full Code Here

Examples of org.jfree.chart.plot.FastScatterPlot

    /**
     * Confirm that cloning works.
     */
    public void testCloning() {
        FastScatterPlot p1 = new FastScatterPlot();
        FastScatterPlot p2 = null;
        try {
            p2 = (FastScatterPlot) p1.clone();
        }
        catch (CloneNotSupportedException e) {
            e.printStackTrace();
            System.err.println("FastScatterPlotTests.testCloning: failed to clone.");
        }
        assertTrue(p1 != p2);
        assertTrue(p1.getClass() == p2.getClass());
        assertTrue(p1.equals(p2));
    }
View Full Code Here

Examples of org.jfree.chart.plot.FastScatterPlot

        float[][] data = createData();

        ValueAxis domainAxis = new NumberAxis("X");
        ValueAxis rangeAxis = new NumberAxis("Y");
        FastScatterPlot p1 = new FastScatterPlot(data, domainAxis, rangeAxis);
        FastScatterPlot p2 = null;

        try {
            ByteArrayOutputStream buffer = new ByteArrayOutputStream();
            ObjectOutput out = new ObjectOutputStream(buffer);
            out.writeObject(p1);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.