本文整理汇总了Java中org.jfree.data.statistics.DefaultStatisticalCategoryDataset.add方法的典型用法代码示例。如果您正苦于以下问题:Java DefaultStatisticalCategoryDataset.add方法的具体用法?Java DefaultStatisticalCategoryDataset.add怎么用?Java DefaultStatisticalCategoryDataset.add使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jfree.data.statistics.DefaultStatisticalCategoryDataset
的用法示例。
在下文中一共展示了DefaultStatisticalCategoryDataset.add方法的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: 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;
}
示例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.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;
}
示例6: 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);
}
示例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 StatisticalBarRenderer());
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).
*/
@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.");
}
}
示例9: processMatchingData
import org.jfree.data.statistics.DefaultStatisticalCategoryDataset; //导入方法依赖的package包/类
@Override
public Data processMatchingData(Data data) {
DefaultStatisticalCategoryDataset dataset = new DefaultStatisticalCategoryDataset();
for (String key : keys) {
if (data.containsKey(key)) {
String val = data.get(key).toString();
double d = Double.parseDouble(val);
SummaryStatistics ss = summaryStatisticsHashMap.get(key);
ss.addValue(d);
dataset.add(ss.getMean(), ss.getStandardDeviation(), " ", key);
} else {
log.warn("The key " + key + " does not exist in the Event");
}
}
histPanel.setDataset(dataset);
histPanel.getPreferredSize();
return data;
}
示例10: 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.");
}
}
示例11: 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));
}
示例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: 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.");
}
}
示例15: testDrawWithNullInfo
import org.jfree.data.statistics.DefaultStatisticalCategoryDataset; //导入方法依赖的package包/类
/**
* Draws the chart with a {@code null} 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.");
}
}