• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java BoxAndWhiskerCategoryDataset类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: createItemArray

import org.jfree.data.statistics.BoxAndWhiskerCategoryDataset; //导入依赖的package包/类
/**
 * Creates the array of items that can be passed to the {@link MessageFormat} class
 * for creating labels.
 *
 * @param dataset  the dataset (<code>null</code> not permitted).
 * @param series  the series (zero-based index).
 * @param item  the item (zero-based index).
 *
 * @return the items (never <code>null</code>).
 */
protected Object[] createItemArray(CategoryDataset dataset, int series, int item) {
    Object[] result = new Object[8];
    result[0] = dataset.getRowKey(series);
    Number y = dataset.getValue(series, item);
    NumberFormat formatter = getNumberFormat();
    result[1] = formatter.format(y);
    if (dataset instanceof BoxAndWhiskerCategoryDataset) {
        BoxAndWhiskerCategoryDataset d = (BoxAndWhiskerCategoryDataset) dataset;
        result[2] = formatter.format(d.getMeanValue(series, item));
        result[3] = formatter.format(d.getMedianValue(series, item));
        result[4] = formatter.format(d.getMinRegularValue(series, item));
        result[5] = formatter.format(d.getMaxRegularValue(series, item));
        result[6] = formatter.format(d.getQ1Value(series, item));
        result[7] = formatter.format(d.getQ3Value(series, item));
    }
    return result;
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:28,代码来源:BoxAndWhiskerToolTipGenerator.java


示例2: createBoxAndWhiskerChart

import org.jfree.data.statistics.BoxAndWhiskerCategoryDataset; //导入依赖的package包/类
/**
 * Creates and returns a default instance of a box and whisker chart
 * based on data from a {@link BoxAndWhiskerCategoryDataset}.
 *
 * @param title  the chart title (<code>null</code> permitted).
 * @param categoryAxisLabel  a label for the category axis 
 *     (<code>null</code> permitted).
 * @param valueAxisLabel  a label for the value axis (<code>null</code> 
 *     permitted).
 * @param dataset  the dataset for the chart (<code>null</code> permitted).
 * @param legend  a flag specifying whether or not a legend is required.
 *
 * @return A box and whisker chart.
 * 
 * @since 1.0.4
 */
public static JFreeChart createBoxAndWhiskerChart(String title,
        String categoryAxisLabel, String valueAxisLabel,
        BoxAndWhiskerCategoryDataset dataset, boolean legend) {
    
    CategoryAxis categoryAxis = new CategoryAxis(categoryAxisLabel);
    NumberAxis valueAxis = new NumberAxis(valueAxisLabel);
    valueAxis.setAutoRangeIncludesZero(false);
    
    BoxAndWhiskerRenderer renderer = new BoxAndWhiskerRenderer();
    renderer.setToolTipGenerator(new BoxAndWhiskerToolTipGenerator());
       
    CategoryPlot plot = new CategoryPlot(dataset, categoryAxis, valueAxis, 
            renderer);
    return new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, 
            legend);
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:33,代码来源:ChartFactory.java


示例3: createItemArray

import org.jfree.data.statistics.BoxAndWhiskerCategoryDataset; //导入依赖的package包/类
/**
 * Creates the array of items that can be passed to the 
 * {@link MessageFormat} class for creating labels.
 *
 * @param dataset  the dataset (<code>null</code> not permitted).
 * @param series  the series (zero-based index).
 * @param item  the item (zero-based index).
 *
 * @return The items (never <code>null</code>).
 */
protected Object[] createItemArray(CategoryDataset dataset, int series, 
                                   int item) {
    Object[] result = new Object[8];
    result[0] = dataset.getRowKey(series);
    Number y = dataset.getValue(series, item);
    NumberFormat formatter = getNumberFormat();
    result[1] = formatter.format(y);
    if (dataset instanceof BoxAndWhiskerCategoryDataset) {
        BoxAndWhiskerCategoryDataset d 
            = (BoxAndWhiskerCategoryDataset) dataset;
        result[2] = formatter.format(d.getMeanValue(series, item));
        result[3] = formatter.format(d.getMedianValue(series, item));
        result[4] = formatter.format(d.getMinRegularValue(series, item));
        result[5] = formatter.format(d.getMaxRegularValue(series, item));
        result[6] = formatter.format(d.getQ1Value(series, item));
        result[7] = formatter.format(d.getQ3Value(series, item));
    }
    return result;
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:30,代码来源:BoxAndWhiskerToolTipGenerator.java


示例4: createBoxAndWhiskerChart

import org.jfree.data.statistics.BoxAndWhiskerCategoryDataset; //导入依赖的package包/类
/**
 * Creates and returns a default instance of a box and whisker chart
 * based on data from a {@link BoxAndWhiskerCategoryDataset}.
 *
 * @param title  the chart title (<code>null</code> permitted).
 * @param categoryAxisLabel  a label for the category axis
 *     (<code>null</code> permitted).
 * @param valueAxisLabel  a label for the value axis (<code>null</code>
 *     permitted).
 * @param dataset  the dataset for the chart (<code>null</code> permitted).
 * @param legend  a flag specifying whether or not a legend is required.
 *
 * @return A box and whisker chart.
 *
 * @since 1.0.4
 */
public static JFreeChart createBoxAndWhiskerChart(String title,
        String categoryAxisLabel, String valueAxisLabel,
        BoxAndWhiskerCategoryDataset dataset, boolean legend) {

    CategoryAxis categoryAxis = new CategoryAxis(categoryAxisLabel);
    NumberAxis valueAxis = new NumberAxis(valueAxisLabel);
    valueAxis.setAutoRangeIncludesZero(false);

    BoxAndWhiskerRenderer renderer = new BoxAndWhiskerRenderer();
    renderer.setBaseToolTipGenerator(new BoxAndWhiskerToolTipGenerator());

    CategoryPlot plot = new CategoryPlot(dataset, categoryAxis, valueAxis,
            renderer);
    JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT,
            plot, legend);
    currentTheme.apply(chart);
    return chart;
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:35,代码来源:ChartFactory.java


示例5: createItemArray

import org.jfree.data.statistics.BoxAndWhiskerCategoryDataset; //导入依赖的package包/类
/**
 * Creates the array of items that can be passed to the
 * {@link MessageFormat} class for creating labels.
 *
 * @param dataset  the dataset (<code>null</code> not permitted).
 * @param series  the series (zero-based index).
 * @param item  the item (zero-based index).
 *
 * @return The items (never <code>null</code>).
 */
@Override
protected Object[] createItemArray(CategoryDataset dataset, int series,
                                   int item) {
    Object[] result = new Object[8];
    result[0] = dataset.getRowKey(series);
    Number y = dataset.getValue(series, item);
    NumberFormat formatter = getNumberFormat();
    result[1] = formatter.format(y);
    if (dataset instanceof BoxAndWhiskerCategoryDataset) {
        BoxAndWhiskerCategoryDataset d
            = (BoxAndWhiskerCategoryDataset) dataset;
        result[2] = formatter.format(d.getMeanValue(series, item));
        result[3] = formatter.format(d.getMedianValue(series, item));
        result[4] = formatter.format(d.getMinRegularValue(series, item));
        result[5] = formatter.format(d.getMaxRegularValue(series, item));
        result[6] = formatter.format(d.getQ1Value(series, item));
        result[7] = formatter.format(d.getQ3Value(series, item));
    }
    return result;
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:31,代码来源:BoxAndWhiskerToolTipGenerator.java


示例6: createBoxAndWhiskerChart

import org.jfree.data.statistics.BoxAndWhiskerCategoryDataset; //导入依赖的package包/类
/**
 * Creates and returns a default instance of a box and whisker chart
 * based on data from a {@link BoxAndWhiskerCategoryDataset}.
 *
 * @param title  the chart title ({@code null} permitted).
 * @param categoryAxisLabel  a label for the category axis
 *     ({@code null} permitted).
 * @param valueAxisLabel  a label for the value axis ({@code null}
 *     permitted).
 * @param dataset  the dataset for the chart ({@code null} permitted).
 * @param legend  a flag specifying whether or not a legend is required.
 *
 * @return A box and whisker chart.
 *
 * @since 1.0.4
 */
public static JFreeChart createBoxAndWhiskerChart(String title,
        String categoryAxisLabel, String valueAxisLabel,
        BoxAndWhiskerCategoryDataset dataset, boolean legend) {

    CategoryAxis categoryAxis = new CategoryAxis(categoryAxisLabel);
    NumberAxis valueAxis = new NumberAxis(valueAxisLabel);
    valueAxis.setAutoRangeIncludesZero(false);

    BoxAndWhiskerRenderer renderer = new BoxAndWhiskerRenderer();
    renderer.setDefaultToolTipGenerator(new BoxAndWhiskerToolTipGenerator());

    CategoryPlot plot = new CategoryPlot(dataset, categoryAxis, valueAxis,
            renderer);
    JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT,
            plot, legend);
    currentTheme.apply(chart);
    return chart;
}
 
开发者ID:jfree,项目名称:jfreechart,代码行数:35,代码来源:ChartFactory.java


示例7: createItemArray

import org.jfree.data.statistics.BoxAndWhiskerCategoryDataset; //导入依赖的package包/类
/**
 * Creates the array of items that can be passed to the
 * {@link MessageFormat} class for creating labels.
 *
 * @param dataset  the dataset ({@code null} not permitted).
 * @param series  the series (zero-based index).
 * @param item  the item (zero-based index).
 *
 * @return The items (never {@code null}).
 */
@Override
protected Object[] createItemArray(CategoryDataset dataset, int series,
                                   int item) {
    Object[] result = new Object[8];
    result[0] = dataset.getRowKey(series);
    Number y = dataset.getValue(series, item);
    NumberFormat formatter = getNumberFormat();
    result[1] = formatter.format(y);
    if (dataset instanceof BoxAndWhiskerCategoryDataset) {
        BoxAndWhiskerCategoryDataset d
            = (BoxAndWhiskerCategoryDataset) dataset;
        result[2] = formatter.format(d.getMeanValue(series, item));
        result[3] = formatter.format(d.getMedianValue(series, item));
        result[4] = formatter.format(d.getMinRegularValue(series, item));
        result[5] = formatter.format(d.getMaxRegularValue(series, item));
        result[6] = formatter.format(d.getQ1Value(series, item));
        result[7] = formatter.format(d.getQ3Value(series, item));
    }
    return result;
}
 
开发者ID:jfree,项目名称:jfreechart,代码行数:31,代码来源:BoxAndWhiskerToolTipGenerator.java


示例8: createChart

import org.jfree.data.statistics.BoxAndWhiskerCategoryDataset; //导入依赖的package包/类
/**
    * Creates a chart.
    * 
    * @param dataset  the dataset.
    * 
    * @return a chart.
    */
   protected JFreeChart createChart(BoxAndWhiskerCategoryDataset dataset) {
         // create the chart...
         
       CategoryAxis domainAxis = new CategoryAxis(null);
       NumberAxis rangeAxis = new NumberAxis("Value");
       CategoryItemRenderer renderer = new BoxAndWhiskerRenderer();
       CategoryPlot plot = new CategoryPlot(
           dataset, domainAxis, rangeAxis, renderer
       );
       JFreeChart chart = new JFreeChart(chartTitle, plot);
   	
       chart.setBackgroundPaint(Color.white);

       plot.setBackgroundPaint(Color.lightGray);
       plot.setDomainGridlinePaint(Color.white);
       plot.setDomainGridlinesVisible(true);
       plot.setRangeGridlinePaint(Color.white);

       rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());

        return chart;
 
}
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:31,代码来源:SuperBoxAndWhiskerChart_Vertical.java


示例9: createBoxAndWhiskerDataset

import org.jfree.data.statistics.BoxAndWhiskerCategoryDataset; //导入依赖的package包/类
private BoxAndWhiskerCategoryDataset createBoxAndWhiskerDataset(int seriesCount, int categoryCount, String[] seriesName, String[][] categoryName, double[][][] values ){

		List<Double> list;

        DefaultBoxAndWhiskerCategoryDataset result 
            = new DefaultBoxAndWhiskerCategoryDataset();

        for (int s = 0; s <seriesCount; s++) {
            for (int c = 0; c <categoryCount; c++) {
				list = new java.util.ArrayList<Double>();
				for (int i=0; i<Array.getLength(values[s][c]);i++)
					list.add(new Double(values[s][c][i]));
                result.add(list, seriesName[s], categoryName[s][c]);
            }
        }
        return result;

	}
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:19,代码来源:ChartGenerator.java


示例10: createDataset2

import org.jfree.data.statistics.BoxAndWhiskerCategoryDataset; //导入依赖的package包/类
protected BoxAndWhiskerCategoryDataset createDataset2(boolean isDemo) {
	if (isDemo){
        SERIES_COUNT = 1;
        CATEGORY_COUNT = 1;
        VALUE_COUNT = 20;
        values_storage = new String[SERIES_COUNT][CATEGORY_COUNT];
   

        DefaultBoxAndWhiskerCategoryDataset result 
            = new DefaultBoxAndWhiskerCategoryDataset();
        List values = createValueList("3, -2, 4, 4, 5, 6, 6, 7, 1, 1, 1, 2,3, 4, 3, 4, 3, 10, 7, 6");
        
        result.add(values, "" , "" );
        
        values_storage[0][0]="3, -2, 4, 4, 5, 6, 6, 7, 1, 1, 1, 2,3, 4, 3, 4, 3, 10, 7, 6";
       
        return result;}
		else return super.createDataset2(false);
}
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:20,代码来源:DotChart.java


示例11: createDataset

import org.jfree.data.statistics.BoxAndWhiskerCategoryDataset; //导入依赖的package包/类
/**
   * Returns a sample dataset.
   * 
   * @return The dataset.
   */
  protected BoxAndWhiskerCategoryDataset createDataset(boolean isDemo) {
if (isDemo){
      SERIES_COUNT = 3;
      CATEGORY_COUNT = 2;
      VALUE_COUNT = 10;
values_storage = new String[SERIES_COUNT][CATEGORY_COUNT];
 

      DefaultBoxAndWhiskerCategoryDataset result 
          = new DefaultBoxAndWhiskerCategoryDataset();

      for (int s = 0; s < SERIES_COUNT; s++) {
          for (int c = 0; c < CATEGORY_COUNT; c++) {
              List values = createValueList(0, 20.0, VALUE_COUNT);
		values_storage[s][c]= vs;
              result.add(values, "Series " + s, "Category " + c);
          }
      }
      return result;}
else return super.createDataset(false);
  }
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:27,代码来源:BoxAndWhiskerChartDemo1.java


示例12: createDataset

import org.jfree.data.statistics.BoxAndWhiskerCategoryDataset; //导入依赖的package包/类
/**
   * Returns a sample dataset.
   * 
   * @return The dataset.
   */
  protected BoxAndWhiskerCategoryDataset createDataset(boolean isDemo) {
if (isDemo){
	rangeLabel = "Value";
      SERIES_COUNT = 3;
     // CATEGORY_COUNT = 2;
      VALUE_COUNT = 10;
values_storage = new String[SERIES_COUNT][CATEGORY_COUNT];
 

      DefaultBoxAndWhiskerCategoryDataset result 
          = new DefaultBoxAndWhiskerCategoryDataset();

      for (int s = 0; s < SERIES_COUNT; s++) {
          for (int c = 0; c < CATEGORY_COUNT; c++) {
              List values = createValueList(0, 20.0, VALUE_COUNT);
		values_storage[s][c]= vs;
              result.add(values, "Series " + s, "Category " + c);
          }
      }
      return result;}
else return super.createDataset(false);
  }
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:28,代码来源:BoxAndWhiskerChartDemo3.java


示例13: createBoxAndWhiskerDataset

import org.jfree.data.statistics.BoxAndWhiskerCategoryDataset; //导入依赖的package包/类
private BoxAndWhiskerCategoryDataset createBoxAndWhiskerDataset(int seriesCount, int categoryCount, String[] seriesName, String[][] categoryName, double[][][] values ){

		List<Double> list;

        DefaultBoxAndWhiskerCategoryDataset result
            = new DefaultBoxAndWhiskerCategoryDataset();

        for (int s = 0; s <seriesCount; s++) {
            for (int c = 0; c <categoryCount; c++) {
				list = new java.util.ArrayList<Double>();
				for (int i=0; i<Array.getLength(values[s][c]);i++)
					list.add(new Double(values[s][c][i]));
                result.add(list, seriesName[s], categoryName[s][c]);
            }
        }
        return result;

	}
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:19,代码来源:ChartGenerator_JTable.java


示例14: createLegend

import org.jfree.data.statistics.BoxAndWhiskerCategoryDataset; //导入依赖的package包/类
protected JFreeChart createLegend(BoxAndWhiskerCategoryDataset dataset) {
     
 	 CategoryAxis domainAxis = new CategoryAxis(null);
      NumberAxis rangeAxis = new NumberAxis("Value");
      BoxAndWhiskerRenderer renderer = new BoxAndWhiskerRenderer();
      CategoryPlot plot = new CategoryPlot(
          dataset, domainAxis, rangeAxis, renderer
      );
      JFreeChart chart = new JFreeChart(chartTitle, plot);
      
System.out.println(SERIES_COUNT + ","+CATEGORY_COUNT);
renderer.setLegendItemLabelGenerator(new SOCRCategoryCellLabelGenerator(dataset, values_storage, SERIES_COUNT, CATEGORY_COUNT));

      return chart;
      
  }
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:17,代码来源:SuperBoxAndWhiskerChart.java


示例15: createItemArray

import org.jfree.data.statistics.BoxAndWhiskerCategoryDataset; //导入依赖的package包/类
/**
 * Creates the array of items that can be passed to the
 * {@link MessageFormat} class for creating labels.
 *
 * @param dataset  the dataset (<code>null</code> not permitted).
 * @param series  the series (zero-based index).
 * @param item  the item (zero-based index).
 *
 * @return The items (never <code>null</code>).
 */
protected Object[] createItemArray(CategoryDataset dataset, int series,
                                   int item) {
    Object[] result = new Object[8];
    result[0] = dataset.getRowKey(series);
    Number y = dataset.getValue(series, item);
    NumberFormat formatter = getNumberFormat();
    result[1] = formatter.format(y);
    if (dataset instanceof BoxAndWhiskerCategoryDataset) {
        BoxAndWhiskerCategoryDataset d
            = (BoxAndWhiskerCategoryDataset) dataset;
        result[2] = formatter.format(d.getMeanValue(series, item));
        result[3] = formatter.format(d.getMedianValue(series, item));
        result[4] = formatter.format(d.getMinRegularValue(series, item));
        result[5] = formatter.format(d.getMaxRegularValue(series, item));
        result[6] = formatter.format(d.getQ1Value(series, item));
        result[7] = formatter.format(d.getQ3Value(series, item));
    }
    return result;
}
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:30,代码来源:BoxAndWhiskerToolTipGenerator.java


示例16: createDumyChart

import org.jfree.data.statistics.BoxAndWhiskerCategoryDataset; //导入依赖的package包/类
public static JFreeChart createDumyChart()
{
    final BoxAndWhiskerCategoryDataset dataset = new DefaultBoxAndWhiskerCategoryDataset();

    final CategoryAxis xAxis = new CategoryAxis( "Type" );
    final NumberAxis yAxis = new NumberAxis( "Value" );
    yAxis.setAutoRangeIncludesZero( false );
    final BoxAndWhiskerRenderer renderer = new BoxAndWhiskerRenderer();
    renderer.setFillBox( true );
    renderer.setMeanVisible( false );
    renderer.setMedianVisible( false );
    // renderer.setToolTipGenerator(new BoxAndWhiskerToolTipGenerator());
    final CategoryPlot plot = new CategoryPlot( dataset, xAxis, yAxis, renderer );

    return new JFreeChart( plot );
}
 
开发者ID:RUB-NDS,项目名称:WS-Attacker,代码行数:17,代码来源:ChartHelper.java


示例17: createWhiskerChart

import org.jfree.data.statistics.BoxAndWhiskerCategoryDataset; //导入依赖的package包/类
public static JFreeChart createWhiskerChart( SuccessfulAttack sa )
{
    BoxAndWhiskerCategoryDataset boxandwhiskercategorydataset = createDataset( sa );
    final BoxAndWhiskerRenderer renderer = new BoxAndWhiskerRenderer();
    renderer.setMaximumBarWidth( 0.05 );
    renderer.setMeanVisible( false );
    renderer.setSeriesPaint( 0, Color.GREEN );
    renderer.setSeriesPaint( 1, Color.RED );
    renderer.setSeriesPaint( 2, Color.BLUE );

    NumberAxis numberAxis = new NumberAxis( "duration in ms" );
    CategoryPlot categoryplot =
        new CategoryPlot( boxandwhiskercategorydataset, new CategoryAxis( "" ), numberAxis, renderer );
    categoryplot.setDomainGridlinesVisible( true );
    categoryplot.setRangePannable( true );
    NumberAxis numberaxis = (NumberAxis) categoryplot.getRangeAxis();
    numberaxis.setStandardTickUnits( NumberAxis.createIntegerTickUnits() );
    JFreeChart jFreeChart = new JFreeChart( "", new Font( "SansSerif", Font.BOLD, 14 ), categoryplot, true );
    jFreeChart.removeLegend();
    return jFreeChart;
}
 
开发者ID:RUB-NDS,项目名称:WS-Attacker,代码行数:22,代码来源:ChartHelper.java


示例18: boxWhiskerPlot

import org.jfree.data.statistics.BoxAndWhiskerCategoryDataset; //导入依赖的package包/类
/**
 * Plots Data for Chart
 */
private void boxWhiskerPlot() {
    BoxAndWhiskerCategoryDataset dataset = createDataset();
    CategoryAxis xAxis = new CategoryAxis("Model");
    NumberAxis yAxis = new NumberAxis("Fitness");
    yAxis.setRange(0.0, 1.0);

    BoxAndWhiskerRenderer renderer = new BoxAndWhiskerRenderer();
    renderer.setFillBox(false);
    renderer.setMaximumBarWidth(0.2);
    renderer.setItemMargin(0.5);
    renderer.setToolTipGenerator(new BoxAndWhiskerToolTipGenerator());
    CategoryPlot plot = new CategoryPlot(dataset, xAxis, yAxis, renderer);
    plot.setOrientation(PlotOrientation.HORIZONTAL);

    chart = new JFreeChart(
            "Model comparison",
            new Font("Palatino", Font.BOLD, 14),
            plot,
            true
    );
    chart.removeLegend();
    // boxWhiskerPane.setCenter(viewer);
}
 
开发者ID:informatik-mannheim,项目名称:Moduro-Toolbox,代码行数:27,代码来源:BoxAndWhiskersPlotDiagram.java


示例19: createDataset

import org.jfree.data.statistics.BoxAndWhiskerCategoryDataset; //导入依赖的package包/类
/**
 * Creates dataset for BoxWhiskerPlot.
 *
 * @return
 */
private BoxAndWhiskerCategoryDataset createDataset() {

    DefaultBoxAndWhiskerCategoryDataset dataset =
            new DefaultBoxAndWhiskerCategoryDataset();

    List<String> sortedModels = bwpModel.getModelTypeName();
    sortedModels.sort(String::compareTo);
    for (String model : sortedModels) {
        StatisticValues stat = bwpModel.getStatisticValues().get(model);
        BoxAndWhiskerItem item = new BoxAndWhiskerItem(stat.getMean(), stat.getSecondPercentile(), stat.getFirstPercentile(), stat.getLastPercentile(), stat.getMin(), stat.getMax(), stat.getMin(), stat.getMax(), new ArrayList<>());
        // Second parameter is the row key (?), using always the same works:
        int n = stat.size();
        dataset.add(item, "", model + " (n=" + n + ")");
    }
    return dataset;
}
 
开发者ID:informatik-mannheim,项目名称:Moduro-Toolbox,代码行数:22,代码来源:BoxAndWhiskersPlotDiagram.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Photo类代码示例发布时间:2022-05-21
下一篇:
Java IRenameRefactoringProvider类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap