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


Java XYZSeries类代码示例

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


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

示例1: createDataset

import com.orsoncharts.data.xyz.XYZSeries; //导入依赖的package包/类
/**
 * Creates a sample dataset (hard-coded for the purpose of keeping the
 * demo self-contained - in practice you would normally read your data
 * from a file, database or other source).
 * 
 * @return A sample dataset.
 */
public static XYZDataset<String> createDataset() {
    XYZSeries<String> s1 = new XYZSeries<>("S1");
    for (int i = 0; i < 1000; i++) {
        s1.add(Math.random() * 100, Math.pow(10, Math.random() * 5), 
                Math.random() * 100);
    }
    XYZSeries<String> s2 = new XYZSeries<>("S2");
    for (int i = 0; i < 1000; i++) {
        s2.add(Math.random() * 100, Math.random() * 100000, 
                Math.random() * 100);
    }
    XYZSeriesCollection<String> dataset = new XYZSeriesCollection<>();
    dataset.add(s1);
    dataset.add(s2);
    return dataset;
}
 
开发者ID:jfree,项目名称:jfree-fxdemos,代码行数:24,代码来源:ScatterPlot3DFXDemo2.java

示例2: createDataset

import com.orsoncharts.data.xyz.XYZSeries; //导入依赖的package包/类
/**
 * Creates a sample dataset (hard-coded for the purpose of keeping the
 * demo self-contained - in practice you would normally read your data
 * from a file, database or other source).
 * 
 * @return A sample dataset.
 */
private static XYZDataset<String> createDataset() {    
    XYZSeriesCollection<String> dataset = new XYZSeriesCollection<>();
    
    for (int s = 1; s < 24; s++) {
        XYZSeries<String> series = new XYZSeries<>("Series " + s);
        double y = 1.0;
        for (int i = 0; i < 3000; i++) {
            y = y * (1.0 + (Math.random() - 0.499) / 10.0);
            series.add(i, y, s);
        }
        dataset.add(series);
    }
    
    return dataset;
}
 
开发者ID:jfree,项目名称:jfree-fxdemos,代码行数:23,代码来源:XYZLineChart3DFXDemo1.java

示例3: createDataset

import com.orsoncharts.data.xyz.XYZSeries; //导入依赖的package包/类
/**
 * Creates a sample dataset (hard-coded for the purpose of keeping the
 * demo self-contained - in practice you would normally read your data
 * from a file, database or other source).
 * 
 * @return A sample dataset.
 */
private static XYZDataset<String> createDataset() {
    XYZSeries<String> s1 = createRandomSeries("S1", 10);
    XYZSeries<String> s2 = createRandomSeries("S2", 50);
    XYZSeries<String> s3 = createRandomSeries("S3", 150);
    XYZSeriesCollection<String> dataset = new XYZSeriesCollection<>();
    dataset.add(s1);
    dataset.add(s2);
    dataset.add(s3);
    return dataset;
}
 
开发者ID:jfree,项目名称:jfree-fxdemos,代码行数:18,代码来源:RangeMarkerFXDemo1.java

示例4: createRandomSeries

import com.orsoncharts.data.xyz.XYZSeries; //导入依赖的package包/类
private static XYZSeries<String> createRandomSeries(String name, int count) {
    XYZSeries<String> s = new XYZSeries<>(name);
    for (int i = 0; i < count; i++) {
        s.add(Math.random() * 100, Math.random() / 100, Math.random() * 100);
    }
    return s;
}
 
开发者ID:jfree,项目名称:jfree-fxdemos,代码行数:8,代码来源:RangeMarkerFXDemo1.java

示例5: createDataset

import com.orsoncharts.data.xyz.XYZSeries; //导入依赖的package包/类
/**
 * Creates a sample dataset (hard-coded for the purpose of keeping the
 * demo self-contained - in practice you would normally read your data
 * from a file, database or other source).
 * 
 * @return A sample dataset.
 */
private static XYZDataset<String> createDataset() {
    XYZSeries<String> series1 = new XYZSeries<>("Series 1");
    series1.add(1.0, 5.0, 1.0);
    XYZSeries<String> series2 = new XYZSeries<>("Series 2");
    series2.add(2.0, 8.0, 2.0);
    XYZSeries<String> series3 = new XYZSeries<>("Series 3");
    series3.add(1.0, 10.0, 2.0);
    XYZSeriesCollection<String> dataset = new XYZSeriesCollection<>();
    dataset.add(series1);
    dataset.add(series2);
    dataset.add(series3);
    return dataset;
}
 
开发者ID:jfree,项目名称:jfree-fxdemos,代码行数:21,代码来源:XYZBarChart3DFXDemo1.java

示例6: createDataset

import com.orsoncharts.data.xyz.XYZSeries; //导入依赖的package包/类
private static XYZDataset<String> createDataset() {
      BufferedReader in = new BufferedReader(new InputStreamReader(
              XYZLineChart3DFXDemo2.class.getResourceAsStream("fxrates.csv")));
      String line;
      XYZSeriesCollection<String> dataset = new XYZSeriesCollection<>();
      XYZSeries<String> aud = new XYZSeries<>("AUD");
      XYZSeries<String> brl = new XYZSeries<>("BRL");
      XYZSeries<String> chf = new XYZSeries<>("CHF");
      XYZSeries<String> cny = new XYZSeries<>("CNY");
      XYZSeries<String> eur = new XYZSeries<>("EUR");
      XYZSeries<String> gbp = new XYZSeries<>("GBP");
      XYZSeries<String> jpy = new XYZSeries<>("JPY");
      try {
          line = in.readLine();  // ignore the first line
   while ((line = in.readLine()) != null) {
              String[] items = line.split(",");
LocalDate d = LocalDate.parse(items[0]);
              aud.add(d.toEpochDay(), Double.valueOf(items[2]), 1);
              brl.add(d.toEpochDay(), Double.valueOf(items[4]), 2);
              chf.add(d.toEpochDay(), Double.valueOf(items[6]), 3);
              cny.add(d.toEpochDay(), Double.valueOf(items[8]), 4);
              eur.add(d.toEpochDay(), Double.valueOf(items[10]), 5);
              gbp.add(d.toEpochDay(), Double.valueOf(items[12]), 6);
              jpy.add(d.toEpochDay(), Double.valueOf(items[14]), 7);
          }
          dataset.add(aud);
          dataset.add(brl);
          dataset.add(chf);
          dataset.add(cny);
          dataset.add(eur);
          dataset.add(gbp);
          dataset.add(jpy);
      } catch (IOException ex) {
          throw new RuntimeException(ex);
      }
      return dataset;
  }
 
开发者ID:jfree,项目名称:jfree-fxdemos,代码行数:38,代码来源:XYZLineChart3DFXDemo2.java

示例7: plotScatter

import com.orsoncharts.data.xyz.XYZSeries; //导入依赖的package包/类
/**
 * Plots the scatter plot with the given series name
 * @param seriesName the name of the series to be plotted
 */
public void plotScatter(String seriesName){
	
	seriesScatter = new XYZSeries(seriesName);
	
	for(XYZDataItem item : dataCache){
		// copy data cache to our series
		seriesScatter.add(item);
	}
	
	seriesSettings = new SeriesSettings(this, new SeriesKey());
	
	seriesCollectionScatter.add(seriesScatter);
	chart = Chart3DFactory.createScatterChart("", "", seriesCollectionScatter, xLabel, zLabel, yLabel);
	plot = (XYZPlot)chart.getPlot();
	rendererScatter = (ScatterXYZRenderer)plot.getRenderer();
	panel = new Chart3DPanel(chart);
	panel.setComponentPopupMenu(graphHandler.getGraphMenu());
	dPanel = new DisplayPanel3D(panel, true, false);
	panel.addMouseListener(graphHandler);
	
	// make sure there is nothing inside this panel before we add our scatter plot
	{
		removeAll();
		revalidate();
		repaint();
	}
	
	add(dPanel,  BorderLayout.CENTER);
	
	/*update all the settings*/
	updateGraph();
	displaySettings.updateDisplay();
	seriesList.updateSeriesList();
}
 
开发者ID:musaeed,项目名称:Prism-gsoc16,代码行数:39,代码来源:Graph3D.java

示例8: getXYZSeries

import com.orsoncharts.data.xyz.XYZSeries; //导入依赖的package包/类
public XYZSeries getXYZSeries(){
	return xyzSeries;
}
 
开发者ID:musaeed,项目名称:Prism-gsoc16,代码行数:4,代码来源:SeriesEditorDialog.java

示例9: getScatterSeries

import com.orsoncharts.data.xyz.XYZSeries; //导入依赖的package包/类
/**
 * Return the series if the current plot is scatter {@code null} otherwise
 * @return
 */
public XYZSeries getScatterSeries(){
	return this.seriesScatter;
}
 
开发者ID:musaeed,项目名称:Prism-gsoc16,代码行数:8,代码来源:Graph3D.java


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