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

Java MatrixSeriesCollection类代码示例

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

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



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

示例1: testEquals

import org.jfree.data.xy.MatrixSeriesCollection; //导入依赖的package包/类
/**
 * Confirm that the equals method can distinguish all the required fields.
 */
public void testEquals() {
    MatrixSeries s1 = new MatrixSeries("Series", 2, 3);
    s1.update(0, 0, 1.1);
    MatrixSeriesCollection c1 = new MatrixSeriesCollection();
    c1.addSeries(s1);
    MatrixSeries s2 = new MatrixSeries("Series", 2, 3);
    s2.update(0, 0, 1.1);
    MatrixSeriesCollection c2 = new MatrixSeriesCollection();
    c2.addSeries(s2);
    assertTrue(c1.equals(c2));
    assertTrue(c2.equals(c1));

    c1.addSeries(new MatrixSeries("Empty Series", 1, 1));
    assertFalse(c1.equals(c2));

    c2.addSeries(new MatrixSeries("Empty Series", 1, 1));
    assertTrue(c1.equals(c2));
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:22,代码来源:MatrixSeriesCollectionTests.java


示例2: clearDataSet

import org.jfree.data.xy.MatrixSeriesCollection; //导入依赖的package包/类
@Override
protected void clearDataSet(final IScope scope) {
	// TODO Auto-generated method stub
	super.clearDataSet(scope);
	final XYPlot plot = (XYPlot) this.chart.getPlot();
	for (int i = plot.getDatasetCount() - 1; i >= 1; i--) {
		plot.setDataset(i, null);
		plot.setRenderer(i, null);
	}
	((MatrixSeriesCollection) jfreedataset.get(0)).removeAllSeries();
	jfreedataset.clear();
	jfreedataset.add(0, new MatrixSeriesCollection());
	plot.setDataset((MatrixSeriesCollection) jfreedataset.get(0));
	plot.setRenderer(0, null);

	IdPosition.clear();
}
 
开发者ID:gama-platform,项目名称:gama,代码行数:18,代码来源:ChartJFreeChartOutputHeatmap.java


示例3: processNode

import org.jfree.data.xy.MatrixSeriesCollection; //导入依赖的package包/类
public void processNode(Object name, Map map, Object value) throws Exception {
    if(value != null && value instanceof MatrixSeriesCollection) {
        this.collection = (MatrixSeriesCollection)value;
    }else {
        // TODO
    }           
}
 
开发者ID:davetcc,项目名称:groovychart,代码行数:8,代码来源:MatrixSeriesCollectionBuilder.java


示例4: createChart

import org.jfree.data.xy.MatrixSeriesCollection; //导入依赖的package包/类
@Override
public void createChart(final IScope scope) {
	super.createChart(scope);

	jfreedataset.add(0, new MatrixSeriesCollection());
	PlotOrientation orientation = PlotOrientation.VERTICAL;
	if (reverse_axes)
		orientation = PlotOrientation.HORIZONTAL;

	chart = ChartFactory.createXYLineChart(getName(), "", "", (MatrixSeriesCollection) jfreedataset.get(0),
			orientation, true, false, false);

}
 
开发者ID:gama-platform,项目名称:gama,代码行数:14,代码来源:ChartJFreeChartOutputHeatmap.java


示例5: createNewSerie

import org.jfree.data.xy.MatrixSeriesCollection; //导入依赖的package包/类
@Override
protected void createNewSerie(final IScope scope, final String serieid) {

	final ChartDataSeries dataserie = chartdataset.getDataSeries(scope, serieid);
	final MatrixSeries serie = new MatrixSeries((String) dataserie.getSerieLegend(scope),
			Math.max(1, this.getChartdataset().getYSeriesValues().size()),
			Math.max(1, this.getChartdataset().getXSeriesValues().size()));
	final XYPlot plot = (XYPlot) this.chart.getPlot();

	final MatrixSeriesCollection firstdataset = (MatrixSeriesCollection) plot.getDataset();

	if (!IdPosition.containsKey(serieid)) {

		if (firstdataset.getSeriesCount() == 0) {
			firstdataset.addSeries(serie);
			plot.setDataset(0, firstdataset);

		} else {

			final MatrixSeriesCollection newdataset = new MatrixSeriesCollection();
			newdataset.addSeries(serie);
			jfreedataset.add(newdataset);
			plot.setDataset(jfreedataset.size() - 1, newdataset);

		}
		plot.setRenderer(jfreedataset.size() - 1, (XYItemRenderer) getOrCreateRenderer(scope, serieid));
		IdPosition.put(serieid, jfreedataset.size() - 1);
		// System.out.println("new serie"+serieid+" at
		// "+IdPosition.get(serieid)+" fdsize "+plot.getSeriesCount()+" jfds
		// "+jfreedataset.size()+" datasc "+plot.getDatasetCount());
		// TODO Auto-generated method stub

	}
}
 
开发者ID:gama-platform,项目名称:gama,代码行数:35,代码来源:ChartJFreeChartOutputHeatmap.java


示例6: buildMainChart

import org.jfree.data.xy.MatrixSeriesCollection; //导入依赖的package包/类
private void buildMainChart(String title, String subTitle, String xAxisLabel, String yAxisLabel,
        String fileName) {
    final MatrixSeriesCollection dataset = new MatrixSeriesCollection(this.createMatrixDataSet());

    final JFreeChart chart = ChartFactory.createBubbleChart(title, xAxisLabel, yAxisLabel, dataset,
            PlotOrientation.VERTICAL, true, true, false);

    chart.addSubtitle(new TextTitle(subTitle));
    chart.setBackgroundPaint(new GradientPaint(0, 0, Color.white, 0, 1000, Color.WHITE));
    chart.removeLegend();

    // Perform customizations starts here ...
    final XYPlot plot1 = chart.getXYPlot();

    plot1.setDomainGridlinesVisible(false);
    plot1.setRangeGridlinesVisible(false);
    plot1.setForegroundAlpha(0.5f);
    plot1.setDomainAxis(new CustomAxis(plot1.getDomainAxis().getLabel()));
    plot1.setRangeAxis(new CustomAxis(plot1.getRangeAxis().getLabel()));

    // Custumize the domain axis ( y )
    final NumberAxis domainAxis = (NumberAxis) plot1.getDomainAxis();
    domainAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
    domainAxis.setRange(-1, this.array.length);

    // Custumize the range axis ( y )
    final NumberAxis rangeAxis = (NumberAxis) plot1.getRangeAxis();
    rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
    rangeAxis.setRange(-1, this.array.length);

    // Create custom renderer
    StandardXYItemRenderer ren = new CustomRenderer(false);
    ren.setSeriesItemLabelPaint(0, Color.BLACK);
    plot1.setRenderer(ren);
    this.mainChart = chart;
}
 
开发者ID:mnip91,项目名称:proactive-component-monitoring,代码行数:37,代码来源:MatrixChart.java


示例7: createDataset

import org.jfree.data.xy.MatrixSeriesCollection; //导入依赖的package包/类
Dataset createDataset(final IScope scope) {
	return new MatrixSeriesCollection();
}
 
开发者ID:gama-platform,项目名称:gama,代码行数:4,代码来源:ChartJFreeChartOutputHeatmap.java


示例8: resetSerie

import org.jfree.data.xy.MatrixSeriesCollection; //导入依赖的package包/类
@Override
	protected void resetSerie(final IScope scope, final String serieid) {
		// TODO Auto-generated method stub
		this.createNewSerie(scope, serieid);
		final ChartDataSeries dataserie = chartdataset.getDataSeries(scope, serieid);
		final MatrixSeries serie =
				((MatrixSeriesCollection) jfreedataset.get(IdPosition.get(dataserie.getSerieId(scope)))).getSeries(0);
		final ArrayList<Double> XValues = dataserie.getXValues(scope);
		final ArrayList<Double> YValues = dataserie.getYValues(scope);
		final ArrayList<Double> SValues = dataserie.getSValues(scope);
		final NumberAxis domainAxis = (NumberAxis) ((XYPlot) this.chart.getPlot()).getDomainAxis();
		if (XValues.size()==0)
		{
			if (!usexrangeinterval && !usexrangeminmax) 
			{
				domainAxis.setAutoRange(false);
				domainAxis.setRange(-0.5,XValues.size()+0.5);				
			}
			
		}
		final NumberAxis rangeAxis = (NumberAxis) ((XYPlot) this.chart.getPlot()).getRangeAxis();
		if (YValues.size()==0)
		{
			if (!useyrangeinterval && !useyrangeminmax) 
			{
				rangeAxis.setAutoRange(false);
				rangeAxis.setRange(-0.5,YValues.size()+0.5);				
			}
			
		}
//		final NumberAxis domainAxis = (NumberAxis) ((XYPlot) this.chart.getPlot()).getDomainAxis();
//		final NumberAxis rangeAxis = (NumberAxis) ((XYPlot) this.chart.getPlot()).getRangeAxis();

		if (XValues.size() > 0) {
			domainAxis.setAutoRange(false);
			rangeAxis.setAutoRange(false);
				domainAxis.setTickLabelsVisible(this.getXTickValueVisible(scope));
				domainAxis.setTickMarksVisible(this.getXTickValueVisible(scope));
				rangeAxis.setTickLabelsVisible(this.getYTickValueVisible(scope));
				rangeAxis.setTickMarksVisible(this.getYTickValueVisible(scope));
			for (int i = 0; i < XValues.size(); i++) {

				if (XValues.get(i)>domainAxis.getUpperBound())
				{
					if (!usexrangeinterval && !usexrangeminmax) 
					{
						domainAxis.setAutoRange(false);
						domainAxis.setRange(-0.5,YValues.get(i)+0.5);				
					}
					
				}
				if (YValues.get(i)>rangeAxis.getUpperBound())
				{
					if (!useyrangeinterval && !useyrangeminmax) 
					{
						rangeAxis.setAutoRange(false);
						rangeAxis.setRange(-0.5,YValues.get(i)+0.5);				
					}
					
				}

				serie.update(YValues.get(i).intValue(), XValues.get(i).intValue(), SValues.get(i).doubleValue());
			}
		}
		this.resetRenderer(scope, serieid);

	}
 
开发者ID:gama-platform,项目名称:gama,代码行数:68,代码来源:ChartJFreeChartOutputHeatmap.java


示例9: testPublicCloneable

import org.jfree.data.xy.MatrixSeriesCollection; //导入依赖的package包/类
/**
 * Verify that this class implements {@link PublicCloneable}.
 */
public void testPublicCloneable() {
    MatrixSeriesCollection c1 = new MatrixSeriesCollection();
    assertTrue(c1 instanceof PublicCloneable);
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:8,代码来源:MatrixSeriesCollectionTests.java


示例10: buildLegendChart

import org.jfree.data.xy.MatrixSeriesCollection; //导入依赖的package包/类
private void buildLegendChart(int nbValues) {
    this.legendValues = new int[nbValues + 1];
    this.legendValues[0] = 0;
    int offset = 255 / nbValues;
    int step = offset;

    if (this.scaleMode == Chart.Scale.LOGARITHMIC) {
        double logStep = (Math.log(this.maxValue) / Math.log(2)) / nbValues;
        for (int i = 1; i < (nbValues + 1); i++) {
            this.legendValues[i] = (int) Math.pow(2, logStep * i);
        }
    } else { // Linear scale mode
        for (int i = 1; i < (nbValues + 1); i++) {
            this.legendValues[i] = (step * this.maxValue) / 255;
            step += offset;
        }
    }

    final MatrixSeriesCollection dataset = new MatrixSeriesCollection(this.createLegendDataSet());

    final JFreeChart chart = ChartFactory.createBubbleChart("", "", "", dataset,
            PlotOrientation.VERTICAL, true, true, false);

    chart.setBackgroundPaint(new GradientPaint(0, 0, Color.white, 0, 1000, Color.WHITE));
    chart.removeLegend();

    // Perform customizations starts here ...
    final XYPlot plot1 = chart.getXYPlot();

    plot1.setDomainGridlinesVisible(false);
    plot1.setRangeGridlinesVisible(false);
    plot1.setForegroundAlpha(0.5f);
    plot1.setDomainAxis(new CustomAxis(plot1.getDomainAxis().getLabel()));
    plot1.setRangeAxis(new CustomAxis(plot1.getRangeAxis().getLabel()));

    // Custumize the domain axis ( x )
    final NumberAxis domainAxis = (NumberAxis) plot1.getDomainAxis();
    domainAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
    domainAxis.setRange(-1, 1);
    domainAxis.setVisible(false);

    // Custumize the range axis ( y )
    final NumberAxis rangeAxis = (NumberAxis) plot1.getRangeAxis();
    rangeAxis.setTickUnit(new CustomTickUnit(rangeAxis.getTickUnit().getSize()));
    rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
    rangeAxis.setRange(-1, this.legendValues.length);
    rangeAxis.setTickLabelsVisible(true);
    rangeAxis.setTickMarkInsideLength(4);

    // Create custom renderer
    StandardXYItemRenderer ren = new CustomRenderer(true);
    ren.setSeriesItemLabelPaint(0, Color.BLUE);
    plot1.setRenderer(ren);
    plot1.setRangeAxisLocation(AxisLocation.TOP_OR_RIGHT);

    this.legendChart = chart;
}
 
开发者ID:mnip91,项目名称:proactive-component-monitoring,代码行数:58,代码来源:MatrixChart.java


示例11: getCollection

import org.jfree.data.xy.MatrixSeriesCollection; //导入依赖的package包/类
/**
 * Getter for property collection.
 * @return Value of property collection.
 */
public MatrixSeriesCollection getCollection() {
    return this.collection;
}
 
开发者ID:davetcc,项目名称:groovychart,代码行数:8,代码来源:MatrixSeriesCollectionBuilder.java


示例12: setCollection

import org.jfree.data.xy.MatrixSeriesCollection; //导入依赖的package包/类
/**
 * Setter for property collection.
 * @param collection New value of property collection.
 */
public void setCollection(MatrixSeriesCollection collection) {
    this.collection = collection;
}
 
开发者ID:davetcc,项目名称:groovychart,代码行数:8,代码来源:MatrixSeriesCollectionBuilder.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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