Package org.jfree.data.statistics

Examples of org.jfree.data.statistics.DefaultBoxAndWhiskerCategoryDataset


    /**
     * A check for bug 1572478 (for the vertical orientation).
     */
    @Test
    public void testBug1572478Vertical() {
        DefaultBoxAndWhiskerCategoryDataset dataset
                = new DefaultBoxAndWhiskerCategoryDataset() {

            @Override
            public Number getQ1Value(int row, int column) {
                return null;
            }

            @Override
            public Number getQ1Value(Comparable rowKey, Comparable columnKey) {
                return null;
            }
        };
        List<Number> values = new ArrayList<Number>();
        values.add(1.0);
        values.add(10.0);
        values.add(100.0);
        dataset.add(values, "row", "column");
        CategoryPlot plot = new CategoryPlot(dataset, new CategoryAxis("x"),
                new NumberAxis("y"), new BoxAndWhiskerRenderer());
        JFreeChart chart = new JFreeChart(plot);

        BufferedImage image = new BufferedImage(200 , 100,
View Full Code Here


    /**
     * A check for bug 1572478 (for the horizontal orientation).
     */
    @Test
    public void testBug1572478Horizontal() {
        DefaultBoxAndWhiskerCategoryDataset dataset
                = new DefaultBoxAndWhiskerCategoryDataset() {

            @Override
            public Number getQ1Value(int row, int column) {
                return null;
            }

            @Override
            public Number getQ1Value(Comparable rowKey, Comparable columnKey) {
                return null;
            }
        };
        List<Number> values = new ArrayList<Number>();
        values.add(1.0);
        values.add(10.0);
        values.add(100.0);
        dataset.add(values, "row", "column");
        CategoryPlot plot = new CategoryPlot(dataset, new CategoryAxis("x"),
                new NumberAxis("y"), new BoxAndWhiskerRenderer());
        plot.setOrientation(PlotOrientation.HORIZONTAL);
        JFreeChart chart = new JFreeChart(plot);

View Full Code Here

    /**
     * Some checks for the getLegendItem() method.
     */
    @Test
    public void testGetLegendItem() {
        DefaultBoxAndWhiskerCategoryDataset dataset
                = new DefaultBoxAndWhiskerCategoryDataset();
        List<Number> values = new ArrayList<Number>();
        values.add(1.10);
        values.add(1.45);
        values.add(1.33);
        values.add(1.23);
        dataset.add(values, "R1", "C1");
        BoxAndWhiskerRenderer r = new BoxAndWhiskerRenderer();
        CategoryPlot plot = new CategoryPlot(dataset, new CategoryAxis("x"),
                new NumberAxis("y"), r);
        /*JFreeChart chart =*/ new JFreeChart(plot);
        LegendItem li = r.getLegendItem(0, 0);
View Full Code Here

    /**
     * Draws a chart where the dataset contains a null mean value.
     */
    @Test
    public void testDrawWithNullMean() {
        DefaultBoxAndWhiskerCategoryDataset dataset
                = new DefaultBoxAndWhiskerCategoryDataset();
        dataset.add(new BoxAndWhiskerItem(null, 2.0,
                0.0, 4.0, 0.5,
                4.5, -0.5, 5.5,
                null), "S1", "C1");
        CategoryPlot plot = new CategoryPlot(dataset,
                new CategoryAxis("Category"), new NumberAxis("Value"),
View Full Code Here

    /**
     * Draws a chart where the dataset contains a null median value.
     */
    @Test
    public void testDrawWithNullMedian() {
            DefaultBoxAndWhiskerCategoryDataset dataset
                    = new DefaultBoxAndWhiskerCategoryDataset();
            dataset.add(new BoxAndWhiskerItem(1.0, null,
                    0.0, 4.0, 0.5,
                    4.5, -0.5, 5.5,
                    null), "S1", "C1");
            CategoryPlot plot = new CategoryPlot(dataset,
                    new CategoryAxis("Category"), new NumberAxis("Value"),
View Full Code Here

     * Draws a chart where the dataset contains a null Q1 value.
     */
    @Test
    public void testDrawWithNullQ1() {

            DefaultBoxAndWhiskerCategoryDataset dataset
                    = new DefaultBoxAndWhiskerCategoryDataset();
            dataset.add(new BoxAndWhiskerItem(1.0, 2.0,
                    null, 4.0, 0.5,
                    4.5, -0.5, 5.5,
                    null), "S1", "C1");
            CategoryPlot plot = new CategoryPlot(dataset,
                    new CategoryAxis("Category"), new NumberAxis("Value"),
View Full Code Here

    /**
     * Draws a chart where the dataset contains a null Q3 value.
     */
    @Test
    public void testDrawWithNullQ3() {
            DefaultBoxAndWhiskerCategoryDataset dataset
                    = new DefaultBoxAndWhiskerCategoryDataset();
            dataset.add(new BoxAndWhiskerItem(1.0, 2.0,
                    3.0, null, 0.5,
                    4.5, -0.5, 5.5,
                    null), "S1", "C1");
            CategoryPlot plot = new CategoryPlot(dataset,
                    new CategoryAxis("Category"), new NumberAxis("Value"),
View Full Code Here

     * Draws a chart where the dataset contains a null min regular value.
     */
    @Test
    public void testDrawWithNullMinRegular() {

        DefaultBoxAndWhiskerCategoryDataset dataset
                = new DefaultBoxAndWhiskerCategoryDataset();
        dataset.add(new BoxAndWhiskerItem(1.0, 2.0,
                3.0, 4.0, null,
                4.5, -0.5, 5.5,
                null), "S1", "C1");
        CategoryPlot plot = new CategoryPlot(dataset,
                new CategoryAxis("Category"), new NumberAxis("Value"),
View Full Code Here

    /**
     * Draws a chart where the dataset contains a null max regular value.
     */
    @Test
    public void testDrawWithNullMaxRegular() {
            DefaultBoxAndWhiskerCategoryDataset dataset
                    = new DefaultBoxAndWhiskerCategoryDataset();
            dataset.add(new BoxAndWhiskerItem(1.0, 2.0,
                    3.0, 4.0, 0.5,
                    null, -0.5, 5.5,
                    null), "S1", "C1");
            CategoryPlot plot = new CategoryPlot(dataset,
                    new CategoryAxis("Category"), new NumberAxis("Value"),
View Full Code Here

    /**
     * Draws a chart where the dataset contains a null min outlier value.
     */
    @Test
    public void testDrawWithNullMinOutlier() {
        DefaultBoxAndWhiskerCategoryDataset dataset
                = new DefaultBoxAndWhiskerCategoryDataset();
        dataset.add(new BoxAndWhiskerItem(1.0, 2.0,
                3.0, 4.0, 0.5,
                4.5, null, 5.5,
                null), "S1", "C1");
        CategoryPlot plot = new CategoryPlot(dataset,
                new CategoryAxis("Category"), new NumberAxis("Value"),
View Full Code Here

TOP

Related Classes of org.jfree.data.statistics.DefaultBoxAndWhiskerCategoryDataset

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.