本文整理汇总了Java中org.jfree.data.statistics.DefaultStatisticalCategoryDataset类的典型用法代码示例。如果您正苦于以下问题:Java DefaultStatisticalCategoryDataset类的具体用法?Java DefaultStatisticalCategoryDataset怎么用?Java DefaultStatisticalCategoryDataset使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DefaultStatisticalCategoryDataset类属于org.jfree.data.statistics包,在下文中一共展示了DefaultStatisticalCategoryDataset类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getDataset
import org.jfree.data.statistics.DefaultStatisticalCategoryDataset; //导入依赖的package包/类
@Override
public DefaultStatisticalCategoryDataset getDataset() {
final Map<String, Statistics> stats_by_application = AnalyticsUtil.getPropertyStatistics(duration_property, experiment_properties, NANOSECOND_TO_SECOND, new String[]{Constants.CONCURRENT_SCANNER_THREAD_POOL_SIZE_PROPERTY});
final DefaultStatisticalCategoryDataset dataset = new DefaultStatisticalCategoryDataset();
for (Map.Entry<String, Statistics> entry : stats_by_application.entrySet()) {
final Statistics statistics = entry.getValue();
final double mean = statistics.getMean().doubleValue();
final double ci = statistics.getConfidenceInterval95Percent().doubleValue();
final String[] groups = entry.getKey().split(GROUP_DELIMITER);
final String pool_size = decoratePoolSize(groups[0]);
dataset.add(mean, ci, "", pool_size);
}
return dataset;
}
示例2: getDataset
import org.jfree.data.statistics.DefaultStatisticalCategoryDataset; //导入依赖的package包/类
@Override
public DefaultStatisticalCategoryDataset getDataset() {
final Map<String, Statistics> stats_by_application = AnalyticsUtil.getPropertyStatistics(duration_property, experiment_properties, NANOSECOND_TO_SECOND, new String[]{Constants.MANAGER_PROPERTY, Constants.KILL_PORTION_PROPERTY});
final DefaultStatisticalCategoryDataset dataset = new DefaultStatisticalCategoryDataset();
for (Map.Entry<String, Statistics> entry : stats_by_application.entrySet()) {
final Statistics statistics = entry.getValue();
final double mean = statistics.getMean().doubleValue();
final double ci = statistics.getConfidenceInterval95Percent().doubleValue();
final String[] groups = entry.getKey().split(GROUP_DELIMITER);
final String manager = decorateManagerAsApplicationName(groups[0]);
final String kill_portion = decorateKillPortion(groups[1]);
dataset.add(mean, ci, manager, kill_portion);
}
return dataset;
}
示例3: getDataset
import org.jfree.data.statistics.DefaultStatisticalCategoryDataset; //导入依赖的package包/类
@Override
public DefaultStatisticalCategoryDataset getDataset() {
final Map<String, Statistics> stats_by_application = AnalyticsUtil.getPropertyStatistics(duration_property, experiment_properties, NANOSECOND_TO_SECOND, new String[]{Constants.MANAGER_PROPERTY});
final DefaultStatisticalCategoryDataset dataset = new DefaultStatisticalCategoryDataset();
for (Map.Entry<String, Statistics> entry : stats_by_application.entrySet()) {
final Statistics statistics = entry.getValue();
final double mean = statistics.getMean().doubleValue();
final double ci = statistics.getConfidenceInterval95Percent().doubleValue();
final String[] groups = entry.getKey().split(GROUP_DELIMITER);
final String application = decorateManagerAsApplicationName(groups[0]);
final String strategy = decorateManagerAsDeploymentStrategy(groups[0]);
dataset.add(mean, ci, application, strategy);
}
return dataset;
}
示例4: toJson
import org.jfree.data.statistics.DefaultStatisticalCategoryDataset; //导入依赖的package包/类
public static JSONArray toJson(DefaultStatisticalCategoryDataset dataset) throws JSONException {
final JSONArray json = new JSONArray();
for (Object row : dataset.getRowKeys()) {
final String row_st = row.toString();
for (Object col : dataset.getColumnKeys()) {
final String col_st = col.toString();
final double mean = dataset.getMeanValue(row_st, col_st).doubleValue();
final double ci = dataset.getStdDevValue(row_st, col_st).doubleValue();
final JSONObject col_value = new JSONObject();
col_value.put("row", row_st);
col_value.put("col", col_st);
col_value.put("mean", format(mean));
col_value.put("lower", format(mean - ci));
col_value.put("upper", format(mean + ci));
json.put(col_value);
}
}
return json;
}
示例5: getDataset
import org.jfree.data.statistics.DefaultStatisticalCategoryDataset; //导入依赖的package包/类
@Override
public DefaultStatisticalCategoryDataset getDataset() {
final Map<String, Statistics> stats_by_application = AnalyticsUtil.getPropertyStatistics(duration_property, experiment_properties, NANOSECOND_TO_SECOND, new String[]{Constants.SCANNER_INTERVAL_PROPERTY});
final DefaultStatisticalCategoryDataset dataset = new DefaultStatisticalCategoryDataset();
for (Map.Entry<String, Statistics> entry : stats_by_application.entrySet()) {
final Statistics statistics = entry.getValue();
final double mean = statistics.getMean().doubleValue();
final double ci = statistics.getConfidenceInterval95Percent().doubleValue();
final String[] groups = entry.getKey().split(GROUP_DELIMITER);
final String pool_size = groups[0];
dataset.add(mean, ci, "", pool_size);
}
return dataset;
}
示例6: getDataset
import org.jfree.data.statistics.DefaultStatisticalCategoryDataset; //导入依赖的package包/类
@Override
public DefaultStatisticalCategoryDataset getDataset() {
final Map<String, Statistics> stats_by_application = AnalyticsUtil.getPropertyStatistics(duration_property, experiment_properties, NANOSECOND_TO_SECOND, new String[]{Constants.MANAGER_PROPERTY, Constants.NETWORK_SIZE_PROPERTY});
final DefaultStatisticalCategoryDataset dataset = new DefaultStatisticalCategoryDataset();
for (Map.Entry<String, Statistics> entry : stats_by_application.entrySet()) {
final Statistics statistics = entry.getValue();
final double mean = statistics.getMean().doubleValue();
final double ci = statistics.getConfidenceInterval95Percent().doubleValue();
final String[] groups = entry.getKey().split(GROUP_DELIMITER);
final String manager = decorateManagerAsApplicationName(groups[0]);
final String network_size = groups[1];
dataset.add(mean, ci, manager, network_size);
}
return dataset;
}
示例7: testDrawWithNullInfo
import org.jfree.data.statistics.DefaultStatisticalCategoryDataset; //导入依赖的package包/类
/**
* Draws the chart with a <code>null</code> info object to make sure that
* no exceptions are thrown (particularly by code in the renderer).
*/
public void testDrawWithNullInfo() {
boolean success = false;
try {
DefaultStatisticalCategoryDataset dataset
= new DefaultStatisticalCategoryDataset();
dataset.add(1.0, 2.0, "S1", "C1");
dataset.add(3.0, 4.0, "S1", "C2");
CategoryPlot plot = new CategoryPlot(dataset,
new CategoryAxis("Category"), new NumberAxis("Value"),
new StatisticalLineAndShapeRenderer());
JFreeChart chart = new JFreeChart(plot);
/* BufferedImage image = */ chart.createBufferedImage(300, 200,
null);
success = true;
}
catch (NullPointerException e) {
e.printStackTrace();
success = false;
}
assertTrue(success);
}
示例8: testDrawWithNullInfo
import org.jfree.data.statistics.DefaultStatisticalCategoryDataset; //导入依赖的package包/类
/**
* Draws the chart with a <code>null</code> info object to make sure that
* no exceptions are thrown (particularly by code in the renderer).
*/
public void testDrawWithNullInfo() {
boolean success = false;
try {
DefaultStatisticalCategoryDataset dataset
= new DefaultStatisticalCategoryDataset();
dataset.add(1.0, 2.0, "S1", "C1");
dataset.add(3.0, 4.0, "S1", "C2");
CategoryPlot plot = new CategoryPlot(dataset,
new CategoryAxis("Category"), new NumberAxis("Value"),
new StatisticalBarRenderer());
JFreeChart chart = new JFreeChart(plot);
/* BufferedImage image = */ chart.createBufferedImage(300, 200,
null);
success = true;
}
catch (NullPointerException e) {
e.printStackTrace();
success = false;
}
assertTrue(success);
}
示例9: testDrawWithNullInfo
import org.jfree.data.statistics.DefaultStatisticalCategoryDataset; //导入依赖的package包/类
/**
* Draws the chart with a <code>null</code> info object to make sure that
* no exceptions are thrown (particularly by code in the renderer).
*/
@Test
public void testDrawWithNullInfo() {
try {
DefaultStatisticalCategoryDataset dataset
= new DefaultStatisticalCategoryDataset();
dataset.add(1.0, 2.0, "S1", "C1");
dataset.add(3.0, 4.0, "S1", "C2");
CategoryPlot plot = new CategoryPlot(dataset,
new CategoryAxis("Category"), new NumberAxis("Value"),
new StatisticalLineAndShapeRenderer());
JFreeChart chart = new JFreeChart(plot);
/* BufferedImage image = */ chart.createBufferedImage(300, 200,
null);
}
catch (NullPointerException e) {
fail("No exception should be thrown.");
}
}
示例10: testDrawWithNullInfo
import org.jfree.data.statistics.DefaultStatisticalCategoryDataset; //导入依赖的package包/类
/**
* Draws the chart with a <code>null</code> info object to make sure that
* no exceptions are thrown (particularly by code in the renderer).
*/
@Test
public void testDrawWithNullInfo() {
try {
DefaultStatisticalCategoryDataset dataset
= new DefaultStatisticalCategoryDataset();
dataset.add(1.0, 2.0, "S1", "C1");
dataset.add(3.0, 4.0, "S1", "C2");
CategoryPlot plot = new CategoryPlot(dataset,
new CategoryAxis("Category"), new NumberAxis("Value"),
new StatisticalBarRenderer());
JFreeChart chart = new JFreeChart(plot);
/* BufferedImage image = */ chart.createBufferedImage(300, 200,
null);
}
catch (NullPointerException e) {
fail("No exception should be thrown.");
}
}
示例11: testDrawWithNullMeanVertical
import org.jfree.data.statistics.DefaultStatisticalCategoryDataset; //导入依赖的package包/类
/**
* Draws the chart with a <code>null</code> mean value to make sure that
* no exceptions are thrown (particularly by code in the renderer). See
* bug report 1779941.
*/
@Test
public void testDrawWithNullMeanVertical() {
try {
DefaultStatisticalCategoryDataset dataset
= new DefaultStatisticalCategoryDataset();
dataset.add(1.0, 2.0, "S1", "C1");
dataset.add(null, new Double(4.0), "S1", "C2");
CategoryPlot plot = new CategoryPlot(dataset,
new CategoryAxis("Category"), new NumberAxis("Value"),
new StatisticalBarRenderer());
JFreeChart chart = new JFreeChart(plot);
/* BufferedImage image = */ chart.createBufferedImage(300, 200,
null);
}
catch (NullPointerException e) {
fail("No exception should be thrown.");
}
}
示例12: testDrawWithNullMeanHorizontal
import org.jfree.data.statistics.DefaultStatisticalCategoryDataset; //导入依赖的package包/类
/**
* Draws the chart with a <code>null</code> mean value to make sure that
* no exceptions are thrown (particularly by code in the renderer). See
* bug report 1779941.
*/
@Test
public void testDrawWithNullMeanHorizontal() {
try {
DefaultStatisticalCategoryDataset dataset
= new DefaultStatisticalCategoryDataset();
dataset.add(1.0, 2.0, "S1", "C1");
dataset.add(null, new Double(4.0), "S1", "C2");
CategoryPlot plot = new CategoryPlot(dataset,
new CategoryAxis("Category"), new NumberAxis("Value"),
new StatisticalBarRenderer());
plot.setOrientation(PlotOrientation.HORIZONTAL);
JFreeChart chart = new JFreeChart(plot);
/* BufferedImage image = */ chart.createBufferedImage(300, 200,
null);
}
catch (NullPointerException e) {
fail("No exception should be thrown.");
}
}
示例13: testDrawWithNullDeviationVertical
import org.jfree.data.statistics.DefaultStatisticalCategoryDataset; //导入依赖的package包/类
/**
* Draws the chart with a <code>null</code> standard deviation to make sure
* that no exceptions are thrown (particularly by code in the renderer).
* See bug report 1779941.
*/
@Test
public void testDrawWithNullDeviationVertical() {
try {
DefaultStatisticalCategoryDataset dataset
= new DefaultStatisticalCategoryDataset();
dataset.add(1.0, 2.0, "S1", "C1");
dataset.add(new Double(4.0), null, "S1", "C2");
CategoryPlot plot = new CategoryPlot(dataset,
new CategoryAxis("Category"), new NumberAxis("Value"),
new StatisticalBarRenderer());
JFreeChart chart = new JFreeChart(plot);
/* BufferedImage image = */ chart.createBufferedImage(300, 200,
null);
}
catch (NullPointerException e) {
fail("No exception should be thrown.");
}
}
示例14: testDrawWithNullDeviationHorizontal
import org.jfree.data.statistics.DefaultStatisticalCategoryDataset; //导入依赖的package包/类
/**
* Draws the chart with a <code>null</code> standard deviation to make sure
* that no exceptions are thrown (particularly by code in the renderer).
* See bug report 1779941.
*/
@Test
public void testDrawWithNullDeviationHorizontal() {
try {
DefaultStatisticalCategoryDataset dataset
= new DefaultStatisticalCategoryDataset();
dataset.add(1.0, 2.0, "S1", "C1");
dataset.add(new Double(4.0), null, "S1", "C2");
CategoryPlot plot = new CategoryPlot(dataset,
new CategoryAxis("Category"), new NumberAxis("Value"),
new StatisticalBarRenderer());
plot.setOrientation(PlotOrientation.HORIZONTAL);
JFreeChart chart = new JFreeChart(plot);
/* BufferedImage image = */ chart.createBufferedImage(300, 200,
null);
}
catch (NullPointerException e) {
fail("No exception should be thrown.");
}
}
示例15: testIterateToFindRangeBounds_StatisticalCategoryDataset
import org.jfree.data.statistics.DefaultStatisticalCategoryDataset; //导入依赖的package包/类
/**
* Some checks for the iterateToFindRangeBounds(CategoryDataset...)
* method.
*/
@Test
public void testIterateToFindRangeBounds_StatisticalCategoryDataset() {
DefaultStatisticalCategoryDataset dataset
= new DefaultStatisticalCategoryDataset();
List visibleSeriesKeys = new ArrayList();
assertNull(DatasetUtilities.iterateToFindRangeBounds(dataset,
visibleSeriesKeys, false));
dataset.add(1.0, 0.5, "R1", "C1");
visibleSeriesKeys.add("R1");
assertEquals(new Range(1.0, 1.0),
DatasetUtilities.iterateToFindRangeBounds(dataset,
visibleSeriesKeys, false));
assertEquals(new Range(0.5, 1.5),
DatasetUtilities.iterateToFindRangeBounds(dataset,
visibleSeriesKeys, true));
}