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


Java IntervalXYDataset类代码示例

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


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

示例1: createDataset1

import org.jfree.data.xy.IntervalXYDataset; //导入依赖的package包/类
/**
 * Creates a sample dataset.
 *
 * @return Series 1.
 */
private IntervalXYDataset createDataset1() {

    // create dataset 1...
    TimeSeries series1 = new TimeSeries("Series 1", Day.class);
    series1.add(new Day(1, MonthConstants.MARCH, 2002), 12353.3);
    series1.add(new Day(2, MonthConstants.MARCH, 2002), 13734.4);
    series1.add(new Day(3, MonthConstants.MARCH, 2002), 14525.3);
    series1.add(new Day(4, MonthConstants.MARCH, 2002), 13984.3);
    series1.add(new Day(5, MonthConstants.MARCH, 2002), 12999.4);
    series1.add(new Day(6, MonthConstants.MARCH, 2002), 14274.3);
    series1.add(new Day(7, MonthConstants.MARCH, 2002), 15943.5);
    series1.add(new Day(8, MonthConstants.MARCH, 2002), 14845.3);
    series1.add(new Day(9, MonthConstants.MARCH, 2002), 14645.4);
    series1.add(new Day(10, MonthConstants.MARCH, 2002), 16234.6);
    series1.add(new Day(11, MonthConstants.MARCH, 2002), 17232.3);
    series1.add(new Day(12, MonthConstants.MARCH, 2002), 14232.2);
    series1.add(new Day(13, MonthConstants.MARCH, 2002), 13102.2);
    series1.add(new Day(14, MonthConstants.MARCH, 2002), 14230.2);
    series1.add(new Day(15, MonthConstants.MARCH, 2002), 11235.2);

    TimeSeriesCollection collection = new TimeSeriesCollection(series1);
    return collection;

}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:30,代码来源:XYPlotTests.java

示例2: createChart

import org.jfree.data.xy.IntervalXYDataset; //导入依赖的package包/类
/**
 * Creates a sample chart.
 * 
 * @param dataset  the dataset.
 * 
 * @return A sample chart.
 */
private JFreeChart createChart(IntervalXYDataset dataset,String s) {
    final JFreeChart chart = ChartFactory.createXYBarChart(
        "Histogram Plot: "+s,
        "Keyword index", 
        false,
        "frequency", 
        dataset,
        PlotOrientation.VERTICAL,
        true,
        true,
        false
    );
    
    XYPlot plot = (XYPlot) chart.getPlot();
    final IntervalMarker target = new IntervalMarker(400.0, 700.0);
    //target.setLabel("Target Range");
    target.setLabelFont(new Font("SansSerif", Font.ITALIC, 11));
    target.setLabelAnchor(RectangleAnchor.LEFT);
    target.setLabelTextAnchor(TextAnchor.CENTER_LEFT);
    target.setPaint(new Color(222, 222, 255, 128));
    plot.addRangeMarker(target, Layer.BACKGROUND);
    return chart;    
}
 
开发者ID:Subarno,项目名称:SentimentAnalysisJava,代码行数:31,代码来源:HistogramExample.java

示例3: createChart

import org.jfree.data.xy.IntervalXYDataset; //导入依赖的package包/类
/**
 * Create a horizontal bar chart with sample data in the range -3 to +3.
 *
 * @return The chart.
 */
private static JFreeChart createChart() {

    // create a dataset...
    XYSeries series1 = new XYSeries("Series 1");
    series1.add(1.0, 1.0);
    series1.add(2.0, 2.0);
    series1.add(3.0, 3.0);
    IntervalXYDataset dataset = new XYBarDataset(new XYSeriesCollection(
            series1), 1.0);
 
    // create the chart...
    return ChartFactory.createXYBarChart(
        "XY Bar Chart",  // chart title
        "Domain", false,
        "Range",
        dataset,         // data
        PlotOrientation.VERTICAL,
        true,            // include legend
        true,            // tooltips
        true             // urls
    );

}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:29,代码来源:XYBarChartTests.java

示例4: createChart

import org.jfree.data.xy.IntervalXYDataset; //导入依赖的package包/类
/**
 * Create a horizontal bar chart with sample data in the range -3 to +3.
 *
 * @return The chart.
 */
private static JFreeChart createChart() {
    XYSeries series1 = new XYSeries("Series 1");
    series1.add(1.0, 1.0);
    series1.add(2.0, 2.0);
    series1.add(3.0, 3.0);
    IntervalXYDataset dataset = new XYBarDataset(new XYSeriesCollection(
            series1), 1.0);
    return ChartFactory.createXYBarChart("XY Bar Chart", "Domain", false,
            "Range", dataset);

}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:17,代码来源:XYBarChartTest.java

示例5: createDataset1

import org.jfree.data.xy.IntervalXYDataset; //导入依赖的package包/类
/**
 * Creates a sample dataset.
 *
 * @return Series 1.
 */
private IntervalXYDataset createDataset1() {

    // create dataset 1...
    TimeSeries series1 = new TimeSeries("Series 1");
    series1.add(new Day(1, MonthConstants.MARCH, 2002), 12353.3);
    series1.add(new Day(2, MonthConstants.MARCH, 2002), 13734.4);
    series1.add(new Day(3, MonthConstants.MARCH, 2002), 14525.3);
    series1.add(new Day(4, MonthConstants.MARCH, 2002), 13984.3);
    series1.add(new Day(5, MonthConstants.MARCH, 2002), 12999.4);
    series1.add(new Day(6, MonthConstants.MARCH, 2002), 14274.3);
    series1.add(new Day(7, MonthConstants.MARCH, 2002), 15943.5);
    series1.add(new Day(8, MonthConstants.MARCH, 2002), 14845.3);
    series1.add(new Day(9, MonthConstants.MARCH, 2002), 14645.4);
    series1.add(new Day(10, MonthConstants.MARCH, 2002), 16234.6);
    series1.add(new Day(11, MonthConstants.MARCH, 2002), 17232.3);
    series1.add(new Day(12, MonthConstants.MARCH, 2002), 14232.2);
    series1.add(new Day(13, MonthConstants.MARCH, 2002), 13102.2);
    series1.add(new Day(14, MonthConstants.MARCH, 2002), 14230.2);
    series1.add(new Day(15, MonthConstants.MARCH, 2002), 11235.2);

    TimeSeriesCollection collection = new TimeSeriesCollection(series1);
    return collection;

}
 
开发者ID:jfree,项目名称:jfreechart,代码行数:30,代码来源:XYPlotTest.java

示例6: createPopCellLengthBeforAfterDivisionChart

import org.jfree.data.xy.IntervalXYDataset; //导入依赖的package包/类
/**
 * TODO Documentation
 * TODO Refactor to fit DistributionChart2D
 * 
 * @param dataset
 * @return
 */
private JFreeChart createPopCellLengthBeforAfterDivisionChart(IntervalXYDataset dataset) {
	String lengthUnit = "μm"; // Set default value
	
	if (forest != null) {
		lengthUnit = forest.getMetaxml().getAllCellsInMetaXML().get(0).getLengthUnit();
	}
	
	final JFreeChart chartLocal = ChartFactory.createHistogram(
               "Cell length before and after division",
               String.format("Cell length [%s]", lengthUnit),
               "Distribution",
               dataset,
               PlotOrientation.VERTICAL,
               true,
               true,
               false
        );

	styleChart(chartLocal);
              
       return chartLocal;
}
 
开发者ID:modsim,项目名称:vizardous,代码行数:30,代码来源:PopulationCellLengthBeforeAfterDivisionDistribution.java

示例7: createPopDivisionTimesChart

import org.jfree.data.xy.IntervalXYDataset; //导入依赖的package包/类
/**
    * TODO Documentation
    * 
    * @param dataset
    * @return
    */
  private JFreeChart createPopDivisionTimesChart(IntervalXYDataset dataset) {
  	String timeUnit = "min"; // Set default value

if (forest != null) {
	timeUnit = forest.getMetaxml().getExperimentDurationUnit();
}
  	
  	final JFreeChart chartLocal = ChartFactory.createHistogram(
              "Division times distribution",
              String.format("Division times [%s]", timeUnit),
              "Occurrence [-]",
              dataset,
              PlotOrientation.VERTICAL,
              true,
              true,
              false
       );

      styleChart(chartLocal);
             
      return chartLocal;
  }
 
开发者ID:modsim,项目名称:vizardous,代码行数:29,代码来源:PopulationDivisionTimesDistributionChart2D.java

示例8: PopulationElongationrateDistributionChart2D

import org.jfree.data.xy.IntervalXYDataset; //导入依赖的package包/类
/**
 * Constructs a {@link PopulationElongationrateDistributionChart2D} from a
 * {@link Forest}.
 * 
 * @param forest
 *            The underlying data model for a chart.
 */
public PopulationElongationrateDistributionChart2D(Forest forest) {
	super(forest);
	
	if(forest != null) {
		this.setLayout(new BorderLayout());
           colorPalette = new LinkedList<Color>();
           final IntervalXYDataset dataset = createPopElongationrateDataset(forest);
           final JFreeChart chart = createPopElongationrateChart(dataset);
           final ChartPanel chartPanel = new ChartPanel(chart);
           chartPanel.setPreferredSize(new Dimension(800, 250));
           chartPanel.setFillZoomRectangle(true);
           
           chartPanel.setMouseZoomable(true, false);
           chartPanel.setBorder(BorderFactory.createLineBorder(new java.awt.Color(214, 214, 214)));
           legendPanel = createLegendPanel(chart);

           this.add(BorderLayout.CENTER, chartPanel);
           this.add(BorderLayout.EAST, legendPanel);
           this.setBackground(Color.white);
           
	} else {
		throw new IllegalArgumentException("Error");
	}
}
 
开发者ID:modsim,项目名称:vizardous,代码行数:32,代码来源:PopulationElongationrateDistributionChart2D.java

示例9: createPopElongationrateChart

import org.jfree.data.xy.IntervalXYDataset; //导入依赖的package包/类
/**
 * TODO Documentation
 * 
 * @param dataset
 * @return
 */
private JFreeChart createPopElongationrateChart(IntervalXYDataset dataset) {
	final JFreeChart chartLocal = ChartFactory.createHistogram(
               "Cell elongatrion rate",
               "Elongation rate [mu/min]",
               "Distribution",
               dataset,
               PlotOrientation.VERTICAL,
               true,
               true,
               false
        );
      
	styleChart(chartLocal);
              
       return chartLocal;
}
 
开发者ID:modsim,项目名称:vizardous,代码行数:23,代码来源:PopulationElongationrateDistributionChart2D.java

示例10: createChart

import org.jfree.data.xy.IntervalXYDataset; //导入依赖的package包/类
/**
    * Creates a chart.
    * 
    * @param dataset  the dataset.
    * 
    * @return a chart.
    */
   protected JFreeChart createChart(IntervalXYDataset dataset) {
         JFreeChart chart = ChartFactory.createXYBarChart(
           chartTitle,      // chart title
           "Date",                     // domain axis label
           true,
           "Y",                        // range axis label
           dataset,                    // data
           PlotOrientation.VERTICAL,
           !legendPanelOn,                       // include legend
           true,
           false
       );

       // NOW DO SOME OPTIONAL CUSTOMISATION OF THE CHART...
       XYPlot plot = chart.getXYPlot();
       plot.setRenderer(new ClusteredXYBarRenderer());
       // OPTIONAL CUSTOMISATION COMPLETED.
       return chart;            
}
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:27,代码来源:SuperYIntervalChartA.java

示例11: createLegend

import org.jfree.data.xy.IntervalXYDataset; //导入依赖的package包/类
protected JFreeChart createLegend(IntervalXYDataset dataset) {
      
JFreeChart chart = ChartFactory.createXYBarChart(
           chartTitle,      // chart title
           "Date",                     // domain axis label
           true,
           "Y",                        // range axis label
           dataset,                    // data
           PlotOrientation.VERTICAL,
           true,                       // include legend
           true,
           false
       );

       // NOW DO SOME OPTIONAL CUSTOMISATION OF THE CHART...
  XYPlot plot = chart.getXYPlot();
       plot.setRenderer(new ClusteredXYBarRenderer());
       return chart;
       
   }
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:21,代码来源:SuperYIntervalChartA.java

示例12: createChart

import org.jfree.data.xy.IntervalXYDataset; //导入依赖的package包/类
/**
 * Creates a new chart.
 * 
 * @param dataset  the dataset.
 * 
 * @return The chart.
 */
protected JFreeChart createChart(IntervalXYDataset dataset) {

    JFreeChart chart = ChartFactory.createScatterPlot(
        chartTitle,  // chart title
        domainLabel,                      // domain axis label
        rangeLabel,                      // range axis label
        dataset,                  // data
        PlotOrientation.VERTICAL,
        !legendPanelOn,                     // include legend
        true,
        false
    );

    XYPlot plot = chart.getXYPlot();
    plot.setRenderer(new YIntervalRenderer());
    setXSummary(dataset);
    return chart;
    
}
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:27,代码来源:YIntervalChartDemo1.java

示例13: createDatasetNumberRequestsTampered

import org.jfree.data.xy.IntervalXYDataset; //导入依赖的package包/类
private IntervalXYDataset createDatasetNumberRequestsTampered()
{

    Date currentDate;
    long currentMsTs;
    final TimeSeries series = new TimeSeries( "Sent Tampered Requests per Second" );
    if ( model.getMapLogEntryIntervalTampered() != null )
    {
        for ( Map.Entry<Integer, LogEntryInterval> log : model.getMapLogEntryIntervalTampered().entrySet() )
        {
            // Create TS from model.startTime and log.getIntervalNumber();
            currentMsTs = model.getTsAttackStart() + log.getValue().getIntervalNumber();
            currentDate = new Date( currentMsTs );
            series.add( new Second( currentDate ), ( log.getValue().getNumberRequests() ) );
        }
    }

    final TimeSeriesCollection dataset = new TimeSeriesCollection( series );
    dataset.setXPosition( TimePeriodAnchor.MIDDLE );

    return dataset;
}
 
开发者ID:RUB-NDS,项目名称:WS-Attacker,代码行数:23,代码来源:ChartObject.java

示例14: crearHistograma

import org.jfree.data.xy.IntervalXYDataset; //导入依赖的package包/类
private JFreeChart crearHistograma(IntervalXYDataset datos) {
    JFreeChart jfreechart = ChartFactory.
            createHistogram("Histograma", "X","Y", datos, PlotOrientation.VERTICAL, false, false, false);
            //createHistogram("Histograma", "X","Y", datos, PlotOrientation.VERTICAL, false, false, false);
           //createXYBarChart("Histograma", "X", false, "Y", datos, PlotOrientation.VERTICAL, false, false, false);
           
    //jfreechart.getCategoryPlot();
    jfreechart.getPlot().setOutlinePaint(Color.black);
    XYPlot cp=(XYPlot)jfreechart.getPlot();
    XYBarRenderer renderer=(XYBarRenderer)cp.getRenderer();
    
    cp.setWeight(80);
    
            
    renderer.setSeriesPaint(0,Color.GRAY);
    jfreechart.setAntiAlias(true);
    jfreechart.setBackgroundPaint(Color.white);
   
    return jfreechart;
}
 
开发者ID:dlfinis,项目名称:PSimulacion,代码行数:21,代码来源:dlgGraf.java

示例15: doChart

import org.jfree.data.xy.IntervalXYDataset; //导入依赖的package包/类
/**
 *  create chart using data from the dataTable
 */
public void doChart(){

	if(dataTable.isEditing())
		dataTable.getCellEditor().stopCellEditing();
	if (! hasExample ) {
		SOCROptionPane.showMessageDialog(this, DATA_MISSING_MESSAGE);
		resetChart();
		return;
	}

	isDemo = false;
	IntervalXYDataset dataset = createDataset(isDemo);	
	
	JFreeChart chart = createChart(dataset);	
	chartPanel = new ChartPanel(chart, isDemo); 
	setChart();
}
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:21,代码来源:SuperIntervalXYChart.java


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