Package org.jfree.chart.axis

Examples of org.jfree.chart.axis.LogAxis


            false,
            false,
            false
        );
        CategoryPlot plot = (CategoryPlot) chart.getPlot();
        LogAxis axis = new LogAxis("Log(Y)");
        plot.setRangeAxis(axis);
        assertEquals(0.0, axis.getLowerBound(), EPSILON);
        assertEquals(2.6066426411261268E7, axis.getUpperBound(), EPSILON);
    }
View Full Code Here


        dataset.setValue(200.0, "Row 1", "Column 2");
        JFreeChart chart = ChartFactory.createLineChart("Test", "Categories",
                "Value", dataset, PlotOrientation.VERTICAL, false, false,
                false);
        CategoryPlot plot = (CategoryPlot) chart.getPlot();
        LogAxis axis = new LogAxis("Log(Y)");
        plot.setRangeAxis(axis);
        assertEquals(96.59363289248458, axis.getLowerBound(), EPSILON);
        assertEquals(207.0529847682752, axis.getUpperBound(), EPSILON);

        // now replacing the dataset should update the axis range...
        DefaultCategoryDataset dataset2 = new DefaultCategoryDataset();
        dataset2.setValue(900.0, "Row 1", "Column 1");
        dataset2.setValue(1000.0, "Row 1", "Column 2");
        plot.setDataset(dataset2);
        assertEquals(895.2712433374774, axis.getLowerBound(), EPSILON);
        assertEquals(1005.2819262292991, axis.getUpperBound(), EPSILON);
    }
View Full Code Here

            false,
            false,
            false
        );
        XYPlot plot = (XYPlot) chart.getPlot();
        LogAxis axis = new LogAxis("Log(Y)");
        plot.setRangeAxis(axis);
        assertEquals(0.9465508226401592, axis.getLowerBound(), EPSILON);
        assertEquals(3.1694019256486126, axis.getUpperBound(), EPSILON);
    }
View Full Code Here

            false,
            false,
            false
        );
        XYPlot plot = (XYPlot) chart.getPlot();
        LogAxis axis = new LogAxis("Log(Y)");
        plot.setRangeAxis(axis);
        assertEquals(0.9465508226401592, axis.getLowerBound(), EPSILON);
        assertEquals(3.1694019256486126, axis.getUpperBound(), EPSILON);
    }
View Full Code Here

    /**
     * Some checks for the setLowerBound() method.
     */
    public void testSetLowerBound() {
        LogAxis axis = new LogAxis("X");
        axis.setRange(0.0, 10.0);
        axis.setLowerBound(5.0);
        assertEquals(5.0, axis.getLowerBound(), EPSILON);
        axis.setLowerBound(10.0);
        assertEquals(10.0, axis.getLowerBound(), EPSILON);
        assertEquals(11.0, axis.getUpperBound(), EPSILON);
    }
View Full Code Here

    /**
     * Checks the default value for the tickMarksVisible flag.
     */
    public void testTickMarksVisibleDefault() {
        LogAxis axis = new LogAxis("Log Axis");
        assertTrue(axis.isTickMarksVisible());
    }
View Full Code Here

   
    /**
     * Checks that a TickUnit with a size of 0 doesn't crash.
     */
    public void testrefreshTicksWithZeroTickUnit() {
        LogAxis axis = new LogAxis();
        AxisState state = new AxisState();
        BufferedImage image = new BufferedImage(200, 100,
                BufferedImage.TYPE_INT_ARGB);
        Graphics2D g2 = image.createGraphics();
        Rectangle2D area = new Rectangle2D.Double(0.0, 0.0, 200, 100);
        axis.refreshTicks(g2, state, area, RectangleEdge.TOP);
    }
View Full Code Here

            fdrTxt.setBackground(confidenceTxt.getBackground());
            fnrTxt.setBackground(confidenceTxt.getBackground());
        }

        // Initialize confidence plot
        scoreAxis = new LogAxis("Probabilistic Score");
        NumberAxis confidenceAxis = new NumberAxis("Confidence [%]");
        confidenceAxis.setAutoRangeIncludesZero(true);
        confidencePlot.setDomainAxis(scoreAxis);
        confidencePlot.setRangeAxis(0, confidenceAxis);
        confidencePlot.setRangeAxisLocation(0, AxisLocation.TOP_OR_LEFT);
View Full Code Here

    plot.setSeriesRenderingOrder(SeriesRenderingOrder.FORWARD);
    plot.setDomainGridlinePaint(gridColor);
    plot.setRangeGridlinePaint(gridColor);

    // Set the domain log axis
    LogAxis logAxisDomain = new LogAxis();
    logAxisDomain.setMinorTickCount(1);
    logAxisDomain.setNumberFormatOverride(MZmineCore.getConfiguration()
        .getIntensityFormat());
    logAxisDomain.setAutoRange(true);
    plot.setDomainAxis(logAxisDomain);

    // Set the range log axis
    LogAxis logAxisRange = new LogAxis();
    logAxisRange.setMinorTickCount(1);
    logAxisRange.setNumberFormatOverride(MZmineCore.getConfiguration()
        .getIntensityFormat());
    logAxisRange.setAutoRange(true);
    plot.setRangeAxis(logAxisRange);

    // Set crosshair properties
    plot.setDomainCrosshairVisible(true);
    plot.setRangeCrosshairVisible(true);
View Full Code Here

        JFreeChart chart = ChartFactory.createScatterPlot(
                null, "Size [bytes]", "Time [s]", new XYSeriesCollection(series), PlotOrientation.VERTICAL, true, true, false
        );
       
        XYPlot plot = (XYPlot) chart.getPlot();
        LogAxis xAxis = new LogAxis("Size [bytes]");
        // Set the base appropriately:
        xAxis.setBase(1024.0);
//        xAxis.setTickUnit( new NumberTickUnit(128.0) );
//        xAxis.getTickUnit().getMinorTickCount();
        // FIXME This should really be a KB/MB/etc number formatter...
        xAxis.setNumberFormatOverride(new LogFormat(1024.0, "1024", true));
//        LogAxis yAxis = new LogAxis("Y");
//        yAxis.setNumberFormatOverride(new LogFormat(10.0, "10", true));
        plot.setDomainAxis(xAxis);
//        plot.setRangeAxis(yAxis);
       
View Full Code Here

TOP

Related Classes of org.jfree.chart.axis.LogAxis

Copyright © 2018 www.massapicom. 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.