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


Java DeviationRenderer.setSeriesPaint方法代码示例

本文整理汇总了Java中org.jfree.chart.renderer.xy.DeviationRenderer.setSeriesPaint方法的典型用法代码示例。如果您正苦于以下问题:Java DeviationRenderer.setSeriesPaint方法的具体用法?Java DeviationRenderer.setSeriesPaint怎么用?Java DeviationRenderer.setSeriesPaint使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.jfree.chart.renderer.xy.DeviationRenderer的用法示例。


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

示例1: configureRendererForDataSet

import org.jfree.chart.renderer.xy.DeviationRenderer; //导入方法依赖的package包/类
private DeviationRenderer configureRendererForDataSet(XYItemRenderer r,
		YIntervalSeriesCollection dataSet) {
	DeviationRenderer renderer = (DeviationRenderer) r;
	YIntervalSeries serie = null;
	for (int i = 0; i < dataSet.getSeriesCount(); i++) {
		serie = dataSet.getSeries(i);
		renderer.setSeriesStroke(i, displayedSeries.get(serie.getKey())
				.getStroke());
		renderer.setSeriesPaint(i, displayedSeries.get(serie.getKey())
				.getColor());
		renderer.setSeriesFillPaint(i, Color.LIGHT_GRAY);

	}
	if (showSdtDev) {
		renderer.setAlpha(0.3f);
	}
	return renderer;
}
 
开发者ID:flyroom,项目名称:PeerfactSimKOM_Clone,代码行数:19,代码来源:MetricsPlot.java

示例2: createNumericalChart

import org.jfree.chart.renderer.xy.DeviationRenderer; //导入方法依赖的package包/类
private JFreeChart createNumericalChart() {
	JFreeChart chart;
	XYDataset dataset = createNumericalDataSet();
	// create the chart...
	String domainName = dataTable == null ? MODEL_DOMAIN_AXIS_NAME : dataTable.getColumnName(plotColumn);
	chart = ChartFactory.createXYLineChart(null, // chart title
			domainName, // x axis label
			RANGE_AXIS_NAME, // y axis label
			dataset, // data
			PlotOrientation.VERTICAL, true, // include legend
			true, // tooltips
			false // urls
			);

	DeviationRenderer renderer = new DeviationRenderer(true, false);
	Stroke stroke = new BasicStroke(2.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND);
	if (dataset.getSeriesCount() == 1) {
		renderer.setSeriesStroke(0, stroke);
		renderer.setSeriesPaint(0, Color.RED);
		renderer.setSeriesFillPaint(0, Color.RED);
	} else {
		for (int i = 0; i < dataset.getSeriesCount(); i++) {
			renderer.setSeriesStroke(i, stroke);
			Color color = getColorProvider().getPointColor((double) i / (double) (dataset.getSeriesCount() - 1));
			renderer.setSeriesPaint(i, color);
			renderer.setSeriesFillPaint(i, color);
		}
	}
	renderer.setAlpha(0.12f);

	XYPlot plot = (XYPlot) chart.getPlot();
	plot.setRenderer(renderer);

	return chart;
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:36,代码来源:DistributionPlotter.java

示例3: createNumericalChart

import org.jfree.chart.renderer.xy.DeviationRenderer; //导入方法依赖的package包/类
private JFreeChart createNumericalChart() {
    JFreeChart chart;
    XYDataset dataset = createNumericalDataSet();
    // create the chart...
    String domainName = dataTable == null ? MODEL_DOMAIN_AXIS_NAME : dataTable.getColumnName(plotColumn);
    chart = ChartFactory.createXYLineChart(null, // chart title
            domainName, // x axis label
            RANGE_AXIS_NAME, // y axis label
            dataset, // data
            PlotOrientation.VERTICAL, true, // include legend
            true, // tooltips
            false // urls
    );

    DeviationRenderer renderer = new DeviationRenderer(true, false);
    Stroke stroke = new BasicStroke(2.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND);
    if (dataset.getSeriesCount() == 1) {
        renderer.setSeriesStroke(0, stroke);
        renderer.setSeriesPaint(0, Color.RED);
        renderer.setSeriesFillPaint(0, Color.RED);
    } else {
        for (int i = 0; i < dataset.getSeriesCount(); i++) {
            renderer.setSeriesStroke(i, stroke);
            Color color = getColorProvider().getPointColor((double) i / (double) (dataset.getSeriesCount() - 1));
            renderer.setSeriesPaint(i, color);
            renderer.setSeriesFillPaint(i, color);
        }
    }
    renderer.setAlpha(0.12f);

    XYPlot plot = (XYPlot) chart.getPlot();
    plot.setRenderer(renderer);

    return chart;
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:36,代码来源:DistributionPlotter.java

示例4: createChart

import org.jfree.chart.renderer.xy.DeviationRenderer; //导入方法依赖的package包/类
private JFreeChart createChart(XYDataset dataset, boolean createLegend) {

		// create the chart...
		JFreeChart chart = ChartFactory.createXYLineChart(null,      // chart title
				null,                      // x axis label
				null,                      // y axis label
				dataset,                  // data
				PlotOrientation.VERTICAL, createLegend,                     // include legend
				true,                     // tooltips
				false                     // urls
				);

		chart.setBackgroundPaint(Color.white);

		// get a reference to the plot for further customization...
		XYPlot plot = (XYPlot) chart.getPlot();
		plot.setBackgroundPaint(Color.WHITE);
		plot.setAxisOffset(new RectangleInsets(5.0, 5.0, 5.0, 5.0));
		plot.setDomainGridlinePaint(Color.LIGHT_GRAY);
		plot.setRangeGridlinePaint(Color.LIGHT_GRAY);

		DeviationRenderer renderer = new DeviationRenderer(true, false);
		Stroke stroke = new BasicStroke(2.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND);
		if (dataset.getSeriesCount() == 1) {
			renderer.setSeriesStroke(0, stroke);
			renderer.setSeriesPaint(0, Color.RED);
			renderer.setSeriesFillPaint(0, Color.RED);
		} else {
			for (int i = 0; i < dataset.getSeriesCount(); i++) {
				renderer.setSeriesStroke(i, stroke);
				Color color = getColorProvider().getPointColor((double) i / (double) (dataset.getSeriesCount() - 1));
				renderer.setSeriesPaint(i, color);
				renderer.setSeriesFillPaint(i, color);
			}
		}
		renderer.setAlpha(0.12f);

		plot.setRenderer(renderer);

		ValueAxis valueAxis = plot.getRangeAxis();
		valueAxis.setLabelFont(LABEL_FONT_BOLD);
		valueAxis.setTickLabelFont(LABEL_FONT);

		return chart;
	}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:46,代码来源:DeviationChartPlotter.java

示例5: createChart

import org.jfree.chart.renderer.xy.DeviationRenderer; //导入方法依赖的package包/类
private JFreeChart createChart(XYDataset dataset) {
	// create the chart...
	JFreeChart chart = ChartFactory.createXYLineChart(null,      // chart title
			null,                      // x axis label
			null,                      // y axis label
			dataset,                  // data
			PlotOrientation.VERTICAL, true,                     // include legend
			true,                     // tooltips
			false                     // urls
			);

	chart.setBackgroundPaint(Color.white);

	// get a reference to the plot for further customisation...
	XYPlot plot = (XYPlot) chart.getPlot();
	plot.setBackgroundPaint(Color.WHITE);
	plot.setAxisOffset(new RectangleInsets(5.0, 5.0, 5.0, 5.0));
	plot.setDomainGridlinePaint(Color.LIGHT_GRAY);
	plot.setRangeGridlinePaint(Color.LIGHT_GRAY);

	ValueAxis valueAxis = plot.getRangeAxis();
	valueAxis.setLabelFont(PlotterAdapter.LABEL_FONT_BOLD);
	valueAxis.setTickLabelFont(PlotterAdapter.LABEL_FONT);

	ValueAxis domainAxis = plot.getDomainAxis();
	domainAxis.setLabelFont(PlotterAdapter.LABEL_FONT_BOLD);
	domainAxis.setTickLabelFont(PlotterAdapter.LABEL_FONT);

	DeviationRenderer renderer = new DeviationRenderer(true, false);
	Stroke stroke = new BasicStroke(2.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND);
	if (dataset.getSeriesCount() == 1) {
		renderer.setSeriesStroke(0, stroke);
		renderer.setSeriesPaint(0, Color.RED);
		renderer.setSeriesFillPaint(0, Color.RED);
	} else if (dataset.getSeriesCount() == 2) {
		renderer.setSeriesStroke(0, stroke);
		renderer.setSeriesPaint(0, Color.RED);
		renderer.setSeriesFillPaint(0, Color.RED);

		renderer.setSeriesStroke(1, stroke);
		renderer.setSeriesPaint(1, Color.BLUE);
		renderer.setSeriesFillPaint(1, Color.BLUE);
	} else {
		for (int i = 0; i < dataset.getSeriesCount(); i++) {
			renderer.setSeriesStroke(i, stroke);
			Color color = colorProvider.getPointColor((double) i / (double) (dataset.getSeriesCount() - 1));
			renderer.setSeriesPaint(i, color);
			renderer.setSeriesFillPaint(i, color);
		}
	}
	renderer.setAlpha(0.12f);
	plot.setRenderer(renderer);

	// legend settings
	LegendTitle legend = chart.getLegend();
	if (legend != null) {
		legend.setPosition(RectangleEdge.TOP);
		legend.setFrame(BlockBorder.NONE);
		legend.setHorizontalAlignment(HorizontalAlignment.LEFT);
		legend.setItemFont(PlotterAdapter.LABEL_FONT);
	}
	return chart;
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:64,代码来源:ROCChartPlotter.java

示例6: createUI

import org.jfree.chart.renderer.xy.DeviationRenderer; //导入方法依赖的package包/类
private void createUI() {

        final XYPlot plot = getPlot();
        plot.setAxisOffset(new RectangleInsets(5, 5, 5, 5));
        plot.setNoDataMessage(NO_DATA_MESSAGE);
        int confidenceDSIndex = 0;
        int regressionDSIndex = 1;
        int scatterpointsDSIndex = 2;
        plot.setDataset(confidenceDSIndex, acceptableDeviationDataset);
        plot.setDataset(regressionDSIndex, regressionDataset);
        plot.setDataset(scatterpointsDSIndex, scatterpointsDataset);

        plot.addAnnotation(r2Annotation);

        final DeviationRenderer identityRenderer = new DeviationRenderer(true, false);
        identityRenderer.setSeriesPaint(0, StatisticChartStyling.SAMPLE_DATA_PAINT);
        identityRenderer.setSeriesFillPaint(0, StatisticChartStyling.SAMPLE_DATA_FILL_PAINT);
        plot.setRenderer(confidenceDSIndex, identityRenderer);

        final DeviationRenderer regressionRenderer = new DeviationRenderer(true, false);
        regressionRenderer.setSeriesPaint(0, StatisticChartStyling.REGRESSION_DATA_PAINT);
        regressionRenderer.setSeriesFillPaint(0, StatisticChartStyling.REGRESSION_DATA_FILL_PAINT);
        plot.setRenderer(regressionDSIndex, regressionRenderer);

        final XYErrorRenderer scatterPointsRenderer = new XYErrorRenderer();
        scatterPointsRenderer.setDrawXError(true);
        scatterPointsRenderer.setErrorStroke(new BasicStroke(1));
        scatterPointsRenderer.setErrorPaint(StatisticChartStyling.CORRELATIVE_POINT_OUTLINE_PAINT);
        scatterPointsRenderer.setSeriesShape(0, StatisticChartStyling.CORRELATIVE_POINT_SHAPE);
        scatterPointsRenderer.setSeriesOutlinePaint(0, StatisticChartStyling.CORRELATIVE_POINT_OUTLINE_PAINT);
        scatterPointsRenderer.setSeriesFillPaint(0, StatisticChartStyling.CORRELATIVE_POINT_FILL_PAINT);
        scatterPointsRenderer.setSeriesLinesVisible(0, false);
        scatterPointsRenderer.setSeriesShapesVisible(0, true);
        scatterPointsRenderer.setSeriesOutlineStroke(0, new BasicStroke(1.0f));
        scatterPointsRenderer.setSeriesToolTipGenerator(0, (dataset, series, item) -> {
            final XYIntervalSeriesCollection collection = (XYIntervalSeriesCollection) dataset;
            final Comparable key = collection.getSeriesKey(series);
            final double xValue = collection.getXValue(series, item);
            final double endYValue = collection.getEndYValue(series, item);
            final double yValue = collection.getYValue(series, item);
            return String.format("%s: mean = %6.2f, sigma = %6.2f | %s: value = %6.2f",
                                 getRasterName(), yValue, endYValue - yValue,
                                 key, xValue);
        });
        plot.setRenderer(scatterpointsDSIndex, scatterPointsRenderer);

        final boolean autoRangeIncludesZero = false;
        final boolean xLog = scatterPlotModel.xAxisLogScaled;
        final boolean yLog = scatterPlotModel.yAxisLogScaled;
        plot.setDomainAxis(
                StatisticChartStyling.updateScalingOfAxis(xLog, plot.getDomainAxis(), autoRangeIncludesZero));
        plot.setRangeAxis(StatisticChartStyling.updateScalingOfAxis(yLog, plot.getRangeAxis(), autoRangeIncludesZero));

        createUI(createChartPanel(chart), createInputParameterPanel(), bindingContext);

        plot.getDomainAxis().addChangeListener(domainAxisChangeListener);
        scatterPlotDisplay.setMouseWheelEnabled(true);
        scatterPlotDisplay.setMouseZoomable(true);
    }
 
开发者ID:senbox-org,项目名称:snap-desktop,代码行数:60,代码来源:ScatterPlotPanel.java

示例7: createChart

import org.jfree.chart.renderer.xy.DeviationRenderer; //导入方法依赖的package包/类
private JFreeChart createChart(XYDataset dataset, boolean createLegend) {

        // create the chart...
        JFreeChart chart = ChartFactory.createXYLineChart(
                null,      // chart title
                null,                      // x axis label
                null,                      // y axis label
                dataset,                  // data
                PlotOrientation.VERTICAL,
                createLegend,                     // include legend
                true,                     // tooltips
                false                     // urls
        );

        chart.setBackgroundPaint(Color.white);

        // get a reference to the plot for further customization...
        XYPlot plot = (XYPlot) chart.getPlot();
        plot.setBackgroundPaint(Color.WHITE);
        plot.setAxisOffset(new RectangleInsets(5.0, 5.0, 5.0, 5.0));
        plot.setDomainGridlinePaint(Color.LIGHT_GRAY);
        plot.setRangeGridlinePaint(Color.LIGHT_GRAY);

        DeviationRenderer renderer = new DeviationRenderer(true, false);
        Stroke stroke = new BasicStroke(2.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND);
        if (dataset.getSeriesCount() == 1) {
            renderer.setSeriesStroke(0, stroke);
            renderer.setSeriesPaint(0, Color.RED);
            renderer.setSeriesFillPaint(0, Color.RED);
        } else {
            for (int i = 0; i < dataset.getSeriesCount(); i++) {
                renderer.setSeriesStroke(i, stroke);
                Color color = getColorProvider().getPointColor((double)i / (double)(dataset.getSeriesCount() - 1));
                renderer.setSeriesPaint(i, color);
                renderer.setSeriesFillPaint(i, color);
            }
        }
        renderer.setAlpha(0.12f);

        plot.setRenderer(renderer);

        ValueAxis valueAxis = plot.getRangeAxis();
        valueAxis.setLabelFont(LABEL_FONT_BOLD);
        valueAxis.setTickLabelFont(LABEL_FONT);

        return chart;
    }
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:48,代码来源:DeviationChartPlotter.java

示例8: createChart

import org.jfree.chart.renderer.xy.DeviationRenderer; //导入方法依赖的package包/类
private JFreeChart createChart(XYDataset dataset) {
      // create the chart...
      JFreeChart chart = ChartFactory.createXYLineChart(
          null,      // chart title
          null,                      // x axis label
          null,                      // y axis label
          dataset,                  // data
          PlotOrientation.VERTICAL,
          true,                     // include legend
          true,                     // tooltips
          false                     // urls
      );

      chart.setBackgroundPaint(Color.white);
     
      // get a reference to the plot for further customisation...
      XYPlot plot = (XYPlot) chart.getPlot();
      plot.setBackgroundPaint(Color.WHITE);
      plot.setAxisOffset(new RectangleInsets(5.0, 5.0, 5.0, 5.0));
      plot.setDomainGridlinePaint(Color.LIGHT_GRAY);
      plot.setRangeGridlinePaint(Color.LIGHT_GRAY);
     
      ValueAxis valueAxis = plot.getRangeAxis();
      valueAxis.setLabelFont(PlotterAdapter.LABEL_FONT_BOLD);
      valueAxis.setTickLabelFont(PlotterAdapter.LABEL_FONT);

      ValueAxis domainAxis = plot.getDomainAxis();
      domainAxis.setLabelFont(PlotterAdapter.LABEL_FONT_BOLD);
      domainAxis.setTickLabelFont(PlotterAdapter.LABEL_FONT);
      
      DeviationRenderer renderer = new DeviationRenderer(true, false);
      Stroke stroke = new BasicStroke(2.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND);
      if (dataset.getSeriesCount() == 1) {
          renderer.setSeriesStroke(0, stroke);
          renderer.setSeriesPaint(0, Color.RED);
          renderer.setSeriesFillPaint(0, Color.RED);            
      } else if (dataset.getSeriesCount() == 2) {        	
      	renderer.setSeriesStroke(0, stroke);
      	renderer.setSeriesPaint(0, Color.RED);
      	renderer.setSeriesFillPaint(0, Color.RED);
      	
      	renderer.setSeriesStroke(1, stroke);
      	renderer.setSeriesPaint(1, Color.BLUE);
      	renderer.setSeriesFillPaint(1, Color.BLUE);
      } else {
          for (int i = 0; i < dataset.getSeriesCount(); i++) {
              renderer.setSeriesStroke(i, stroke);
              Color color = colorProvider.getPointColor((double)i / (double)(dataset.getSeriesCount() - 1));
              renderer.setSeriesPaint(i, color);
              renderer.setSeriesFillPaint(i, color);
          }
      }
      renderer.setAlpha(0.12f);        
      plot.setRenderer(renderer);
        
// legend settings
LegendTitle legend = chart.getLegend();
if (legend != null) {
	legend.setPosition(RectangleEdge.TOP);
	legend.setFrame(BlockBorder.NONE);
	legend.setHorizontalAlignment(HorizontalAlignment.LEFT);
	legend.setItemFont(PlotterAdapter.LABEL_FONT);
}
      return chart;
  }
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:66,代码来源:ROCChartPlotter.java


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