当前位置: 首页>>代码示例>>Java>>正文


Java DefaultBoxAndWhiskerXYDataset类代码示例

本文整理汇总了Java中org.jfree.data.statistics.DefaultBoxAndWhiskerXYDataset的典型用法代码示例。如果您正苦于以下问题:Java DefaultBoxAndWhiskerXYDataset类的具体用法?Java DefaultBoxAndWhiskerXYDataset怎么用?Java DefaultBoxAndWhiskerXYDataset使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


DefaultBoxAndWhiskerXYDataset类属于org.jfree.data.statistics包,在下文中一共展示了DefaultBoxAndWhiskerXYDataset类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: test2909215

import org.jfree.data.statistics.DefaultBoxAndWhiskerXYDataset; //导入依赖的package包/类
/**
 * A test for bug report 2909215.
 */
@Test
public void test2909215() {
    DefaultBoxAndWhiskerXYDataset d1 = new DefaultBoxAndWhiskerXYDataset(
            "Series");
    d1.add(new Date(1L), new BoxAndWhiskerItem(new Double(1.0),
            new Double(2.0), new Double(3.0), new Double(4.0),
            new Double(5.0), new Double(6.0), null, null, null));
    JFreeChart chart = ChartFactory.createBoxAndWhiskerChart("Title", "X",
            "Y", d1, true);
    try {
        BufferedImage image = new BufferedImage(400, 200,
                BufferedImage.TYPE_INT_RGB);
        Graphics2D g2 = image.createGraphics();
        chart.draw(g2, new Rectangle2D.Double(0, 0, 400, 200), null, null);
        g2.dispose();
    }
    catch (Exception e) {
        fail("No exception should be thrown.");
    }
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:24,代码来源:XYBoxAndWhiskerRendererTest.java

示例2: testIterateToFindRangeBounds_BoxAndWhiskerXYDataset

import org.jfree.data.statistics.DefaultBoxAndWhiskerXYDataset; //导入依赖的package包/类
/**
 * Some checks for the iterateToFindRangeBounds() method when applied to
 * a BoxAndWhiskerXYDataset.
 */
@Test
public void testIterateToFindRangeBounds_BoxAndWhiskerXYDataset() {
    DefaultBoxAndWhiskerXYDataset dataset
            = new DefaultBoxAndWhiskerXYDataset("Series 1");
    List visibleSeriesKeys = new ArrayList();
    visibleSeriesKeys.add("Series 1");
    Range xRange = new Range(Double.NEGATIVE_INFINITY,
            Double.POSITIVE_INFINITY);
    assertNull(DatasetUtilities.iterateToFindRangeBounds(dataset,
            visibleSeriesKeys, xRange, false));

    dataset.add(new Date(50L), new BoxAndWhiskerItem(5.0, 4.9, 2.0, 8.0,
            1.0, 9.0, 0.0, 10.0, new ArrayList()));
    assertEquals(new Range(5.0, 5.0),
            DatasetUtilities.iterateToFindRangeBounds(dataset,
            visibleSeriesKeys, xRange, false));
    assertEquals(new Range(1.0, 9.0),
            DatasetUtilities.iterateToFindRangeBounds(dataset,
            visibleSeriesKeys, xRange, true));
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:25,代码来源:DatasetUtilitiesTest.java

示例3: testIterateToFindRangeBounds_BoxAndWhiskerXYDataset

import org.jfree.data.statistics.DefaultBoxAndWhiskerXYDataset; //导入依赖的package包/类
/**
 * Some checks for the iterateToFindRangeBounds() method when applied to
 * a BoxAndWhiskerXYDataset.
 */
@Test
public void testIterateToFindRangeBounds_BoxAndWhiskerXYDataset() {
    DefaultBoxAndWhiskerXYDataset dataset
            = new DefaultBoxAndWhiskerXYDataset("Series 1");
    List visibleSeriesKeys = new ArrayList();
    visibleSeriesKeys.add("Series 1");
    Range xRange = new Range(Double.NEGATIVE_INFINITY,
            Double.POSITIVE_INFINITY);
    assertNull(DatasetUtils.iterateToFindRangeBounds(dataset,
            visibleSeriesKeys, xRange, false));

    dataset.add(new Date(50L), new BoxAndWhiskerItem(5.0, 4.9, 2.0, 8.0,
            1.0, 9.0, 0.0, 10.0, new ArrayList()));
    assertEquals(new Range(5.0, 5.0),
            DatasetUtils.iterateToFindRangeBounds(dataset,
            visibleSeriesKeys, xRange, false));
    assertEquals(new Range(1.0, 9.0),
            DatasetUtils.iterateToFindRangeBounds(dataset,
            visibleSeriesKeys, xRange, true));
}
 
开发者ID:jfree,项目名称:jfreechart,代码行数:25,代码来源:DatasetUtilsTest.java

示例4: testIterateToFindRangeBounds_BoxAndWhiskerXYDataset

import org.jfree.data.statistics.DefaultBoxAndWhiskerXYDataset; //导入依赖的package包/类
/**
 * Some checks for the iterateToFindRangeBounds() method when applied to
 * a BoxAndWhiskerXYDataset.
 */
public void testIterateToFindRangeBounds_BoxAndWhiskerXYDataset() {
    DefaultBoxAndWhiskerXYDataset dataset
            = new DefaultBoxAndWhiskerXYDataset("Series 1");
    List visibleSeriesKeys = new ArrayList();
    visibleSeriesKeys.add("Series 1");
    Range xRange = new Range(Double.NEGATIVE_INFINITY,
            Double.POSITIVE_INFINITY);
    assertNull(DatasetUtilities.iterateToFindRangeBounds(dataset,
            visibleSeriesKeys, xRange, false));

    dataset.add(new Date(50L), new BoxAndWhiskerItem(5.0, 4.9, 2.0, 8.0,
            1.0, 9.0, 0.0, 10.0, new ArrayList()));
    assertEquals(new Range(5.0, 5.0),
            DatasetUtilities.iterateToFindRangeBounds(dataset,
            visibleSeriesKeys, xRange, false));
    assertEquals(new Range(1.0, 9.0),
            DatasetUtilities.iterateToFindRangeBounds(dataset,
            visibleSeriesKeys, xRange, true));
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:24,代码来源:DatasetUtilitiesTests.java

示例5: testAdd

import org.jfree.data.statistics.DefaultBoxAndWhiskerXYDataset; //导入依赖的package包/类
/**
 * Some checks for the add() method.
 */
public void testAdd() {
    DefaultBoxAndWhiskerXYDataset dataset
            = new DefaultBoxAndWhiskerXYDataset("S1");
    BoxAndWhiskerItem item1 = new BoxAndWhiskerItem(1.0, 2.0, 3.0, 4.0,
            5.0, 6.0, 7.0, 8.0, new ArrayList());
    dataset.add(new Date(33L), item1);

    assertEquals(1.0, dataset.getY(0, 0).doubleValue(), EPSILON);
    assertEquals(1.0, dataset.getMeanValue(0, 0).doubleValue(), EPSILON);
    assertEquals(2.0, dataset.getMedianValue(0, 0).doubleValue(), EPSILON);
    assertEquals(3.0, dataset.getQ1Value(0, 0).doubleValue(), EPSILON);
    assertEquals(4.0, dataset.getQ3Value(0, 0).doubleValue(), EPSILON);
    assertEquals(5.0, dataset.getMinRegularValue(0, 0).doubleValue(),
            EPSILON);
    assertEquals(6.0, dataset.getMaxRegularValue(0, 0).doubleValue(),
            EPSILON);
    assertEquals(7.0, dataset.getMinOutlier(0, 0).doubleValue(), EPSILON);
    assertEquals(8.0, dataset.getMaxOutlier(0, 0).doubleValue(), EPSILON);
    assertEquals(new Range(5.0, 6.0), dataset.getRangeBounds(false));
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:24,代码来源:DefaultBoxAndWhiskerXYDatasetTests.java

示例6: testGetRangeBounds

import org.jfree.data.statistics.DefaultBoxAndWhiskerXYDataset; //导入依赖的package包/类
/**
 * Some checks for the getRangeBounds() method.
 */
public void testGetRangeBounds() {
    DefaultBoxAndWhiskerXYDataset d1
            = new DefaultBoxAndWhiskerXYDataset("S");
    d1.add(new Date(1L), new BoxAndWhiskerItem(1.0, 2.0, 3.0, 4.0, 5.0,
            6.0, 7.0, 8.0, new ArrayList()));
    assertEquals(new Range(5.0, 6.0), d1.getRangeBounds(false));
    assertEquals(new Range(5.0, 6.0), d1.getRangeBounds(true));

    d1.add(new Date(1L), new BoxAndWhiskerItem(1.5, 2.5, 3.5, 4.5, 5.5,
            6.5, 7.5, 8.5, new ArrayList()));
    assertEquals(new Range(5.0, 6.5), d1.getRangeBounds(false));
    assertEquals(new Range(5.0, 6.5), d1.getRangeBounds(true));

    d1.add(new Date(2L), new BoxAndWhiskerItem(2.5, 3.5, 4.5, 5.5, 6.5,
            7.5, 8.5, 9.5, new ArrayList()));
    assertEquals(new Range(5.0, 7.5), d1.getRangeBounds(false));
    assertEquals(new Range(5.0, 7.5), d1.getRangeBounds(true));
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:22,代码来源:DefaultBoxAndWhiskerXYDatasetTests.java

示例7: processNode

import org.jfree.data.statistics.DefaultBoxAndWhiskerXYDataset; //导入依赖的package包/类
public void processNode(Object name, Map map, Object value) throws Exception {
    if(value != null && value instanceof DefaultBoxAndWhiskerXYDataset) {
        this.xyDataset = (DefaultBoxAndWhiskerXYDataset)value;
    }else {
        // TODO
    }
}
 
开发者ID:davetcc,项目名称:groovychart,代码行数:8,代码来源:DefaultBoxAndWhiskerXYDatasetBuilder.java

示例8: testEquals

import org.jfree.data.statistics.DefaultBoxAndWhiskerXYDataset; //导入依赖的package包/类
/**
 * Confirm that the equals method can distinguish all the required fields.
 */
public void testEquals() {
    DefaultBoxAndWhiskerXYDataset d1 = new DefaultBoxAndWhiskerXYDataset(
            "Series");
    DefaultBoxAndWhiskerXYDataset d2 = new DefaultBoxAndWhiskerXYDataset(
            "Series");
    assertTrue(d1.equals(d2));

    d1.add(new Date(1L), new BoxAndWhiskerItem(1.0, 2.0, 3.0, 4.0, 5.0,
            6.0, 7.0, 8.0, new ArrayList()));
    assertFalse(d1.equals(d2));
    d2.add(new Date(1L), new BoxAndWhiskerItem(1.0, 2.0, 3.0, 4.0, 5.0,
            6.0, 7.0, 8.0, new ArrayList()));
    assertTrue(d1.equals(d2));
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:18,代码来源:DefaultBoxAndWhiskerXYDatasetTests.java

示例9: testConstructor

import org.jfree.data.statistics.DefaultBoxAndWhiskerXYDataset; //导入依赖的package包/类
/**
 * Some basic checks for the constructor.
 */
public void testConstructor() {
    DefaultBoxAndWhiskerXYDataset dataset
            = new DefaultBoxAndWhiskerXYDataset("S1");
    assertEquals(1, dataset.getSeriesCount());
    assertEquals(0, dataset.getItemCount(0));
    assertTrue(Double.isNaN(dataset.getRangeLowerBound(false)));
    assertTrue(Double.isNaN(dataset.getRangeUpperBound(false)));
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:12,代码来源:DefaultBoxAndWhiskerXYDatasetTests.java

示例10: getXyDataset

import org.jfree.data.statistics.DefaultBoxAndWhiskerXYDataset; //导入依赖的package包/类
/**
 * Getter for property xyDataset.
 * @return Value of property xyDataset.
 */
public DefaultBoxAndWhiskerXYDataset getXyDataset() {
    return this.xyDataset;
}
 
开发者ID:davetcc,项目名称:groovychart,代码行数:8,代码来源:DefaultBoxAndWhiskerXYDatasetBuilder.java

示例11: setXyDataset

import org.jfree.data.statistics.DefaultBoxAndWhiskerXYDataset; //导入依赖的package包/类
/**
 * Setter for property xyDataset.
 * @param xyDataset New value of property xyDataset.
 */
public void setXyDataset(DefaultBoxAndWhiskerXYDataset xyDataset) {
    this.xyDataset = xyDataset;
}
 
开发者ID:davetcc,项目名称:groovychart,代码行数:8,代码来源:DefaultBoxAndWhiskerXYDatasetBuilder.java


注:本文中的org.jfree.data.statistics.DefaultBoxAndWhiskerXYDataset类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。