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


Java XYLineAndShapeRenderer.setSeriesOutlinePaint方法代码示例

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


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

示例1: createChart

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

        JFreeChart chart = ChartFactory.createScatterPlot(this.title,
                this.xAxisLabel, this.yAxisLable, dataset, PlotOrientation.VERTICAL, true, true, false);

        XYPlot plot = (XYPlot) chart.getPlot();
        plot.setNoDataMessage("NO DATA");
        XYLineAndShapeRenderer renderer
                = (XYLineAndShapeRenderer) plot.getRenderer();
        renderer.setSeriesOutlinePaint(0, Color.black);
        renderer.setUseOutlinePaint(true);

        NumberAxis domainAxis = (NumberAxis) plot.getDomainAxis();
        domainAxis.setAutoRangeIncludesZero(false);
        return chart;

    }
 
开发者ID:Fanping,项目名称:iveely.ml,代码行数:18,代码来源:ScatterPlot.java

示例2: OrderParameterVsRandomnessChart

import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer; //导入方法依赖的package包/类
public OrderParameterVsRandomnessChart( int maxItemCount ) {
    this.maxItemCount = maxItemCount;

    meanSeries = new XYSeries( "Raw Data" );
    lineSeries = new XYSeries( "Mean Values" );
    xySeriesCollection = new XYSeriesCollection( meanSeries );

    xySeriesCollection.addSeries( lineSeries );
    domainAxis = new NumberAxis( "Randomness" );
    rangeAxis = new NumberAxis( "Order Parameter" );
    renderer = new XYLineAndShapeRenderer();

    int RAW_DATA_SERIES = 0;
    int LINE_SERIES = 1;
    renderer.setSeriesShape( RAW_DATA_SERIES, new Ellipse2D.Double( -3, -3, 6, 6 ) );
    renderer.setSeriesShape( LINE_SERIES, new Rectangle( -4, -4, 8, 8 ) );
    renderer.setSeriesLinesVisible( RAW_DATA_SERIES, false );
    renderer.setSeriesShapesVisible( RAW_DATA_SERIES, true );
    Color blue = new Color( 0, 0, 255, 14 );
    renderer.setSeriesPaint( RAW_DATA_SERIES, blue );
    renderer.setSeriesItemLabelPaint( RAW_DATA_SERIES, blue );
    renderer.setSeriesOutlinePaint( RAW_DATA_SERIES, blue );
    renderer.setSeriesLinesVisible( LINE_SERIES, true );
    xyPlot = new XYPlot( xySeriesCollection,
                         domainAxis,
                         rangeAxis, renderer );
    chart = new JFreeChart( "Order Parameter vs. Randomness", xyPlot );
    rangeAxis.setRange( -0.01, 1.01 );
    domainAxis.setAutoRange( false );
    domainAxis.setRange( 0 - 0.01, Math.PI * 2 + 0.01 );
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:32,代码来源:OrderParameterVsRandomnessChart.java

示例3: createScatterChart

import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer; //导入方法依赖的package包/类
@Override
protected JFreeChart createScatterChart() throws JRException
{
	JFreeChart jfreeChart = super.createScatterChart();
	XYPlot xyPlot = (XYPlot) jfreeChart.getPlot();
	
	xyPlot.setRangeGridlinePaint(SCATTER_GRIDLINE_COLOR);
	xyPlot.setRangeGridlineStroke(new BasicStroke(0.75f));
	xyPlot.setDomainGridlinesVisible(true);
	xyPlot.setDomainGridlinePaint(SCATTER_GRIDLINE_COLOR);
	xyPlot.setDomainGridlineStroke(new BasicStroke(0.75f));
	xyPlot.setRangeZeroBaselinePaint(ChartThemesConstants.GRAY_PAINT_134);

	XYLineAndShapeRenderer lineRenderer = (XYLineAndShapeRenderer)xyPlot.getRenderer();
	lineRenderer.setUseFillPaint(true);
	JRScatterPlot scatterPlot = (JRScatterPlot) getPlot();
	boolean isShowLines = scatterPlot.getShowLines() == null ? false : scatterPlot.getShowLines().booleanValue();
	lineRenderer.setBaseLinesVisible(isShowLines);
	XYDataset xyDataset = xyPlot.getDataset();
	if (xyDataset != null)
	{
		for (int i = 0; i < xyDataset.getSeriesCount(); i++)
		{
			lineRenderer.setSeriesOutlinePaint(i, ChartThemesConstants.TRANSPARENT_PAINT);
			lineRenderer.setSeriesFillPaint(i, ChartThemesConstants.EYE_CANDY_SIXTIES_GRADIENT_PAINTS.get(i));
			lineRenderer.setSeriesPaint(i, ChartThemesConstants.EYE_CANDY_SIXTIES_COLORS.get(i));
			//lineRenderer.setSeriesShape(i, new Ellipse2D.Double(-3, -3, 6, 6));
		}
	}
	return jfreeChart;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:32,代码来源:EyeCandySixtiesChartTheme.java

示例4: configureXYLineAndShapeRenderer

import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer; //导入方法依赖的package包/类
private static void configureXYLineAndShapeRenderer(XYLineAndShapeRenderer renderer, ValueSource valueSource,
		PlotInstance plotInstance) {
	renderer.setBaseToolTipGenerator(new StandardXYToolTipGenerator());
	SeriesFormat seriesFormat = valueSource.getSeriesFormat();
	DimensionConfig domainConfig = valueSource.getDomainConfig();
	DimensionConfig colorDimensionConfig = plotInstance.getCurrentPlotConfigurationClone().getDimensionConfig(
			PlotDimension.COLOR);
	DimensionConfig shapeDimensionConfig = plotInstance.getCurrentPlotConfigurationClone().getDimensionConfig(
			PlotDimension.SHAPE);
	ValueSourceData valueSourceData = plotInstance.getPlotData().getValueSourceData(valueSource);

	int seriesCount = valueSourceData.getSeriesDataForAllGroupCells().groupCellCount();

	// Loop all series and set series format.
	// Format based on dimension configs will be set later on in initFormatDelegate().
	for (int seriesIdx = 0; seriesIdx < seriesCount; ++seriesIdx) {
		// configure linestyle
		if (seriesFormat.getLineStyle() == LineStyle.NONE) {
			renderer.setSeriesLinesVisible(seriesIdx, false);
		} else {
			renderer.setSeriesLinesVisible(seriesIdx, true);
			renderer.setSeriesStroke(seriesIdx, seriesFormat.getStroke(), false);
		}

		// configure series shape if necessary
		if (!SeriesFormat.calculateIndividualFormatForEachItem(domainConfig, shapeDimensionConfig)) {
			if (seriesFormat.getItemShape() != ItemShape.NONE) {
				renderer.setSeriesShapesVisible(seriesIdx, true);
				renderer.setSeriesShape(seriesIdx, seriesFormat.getItemShape().getShape());
			} else {
				renderer.setSeriesShapesVisible(seriesIdx, false);
			}
		}

		// configure series color if necessary
		if (!SeriesFormat.calculateIndividualFormatForEachItem(domainConfig, colorDimensionConfig)) {
			Color itemColor = seriesFormat.getItemColor();
			renderer.setSeriesPaint(seriesIdx, itemColor);
			renderer.setSeriesFillPaint(seriesIdx, itemColor);
		}
		renderer.setSeriesOutlinePaint(seriesIdx, PlotConfiguration.DEFAULT_SERIES_OUTLINE_PAINT);
		renderer.setUseOutlinePaint(true);
	}
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:45,代码来源:ChartRendererFactory.java

示例5: createChart

import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer; //导入方法依赖的package包/类
public static JFreeChart createChart(XYDataset xydataset, String shou, String shu) {
	JFreeChart jfreechart = ChartFactory.createScatterPlot("Rating and Rating People Distribution", shou, shu,
			xydataset, PlotOrientation.VERTICAL, true, false, false);
	jfreechart.setBackgroundPaint(Color.white);
	jfreechart.setBorderPaint(Color.GREEN);

	XYPlot xyplot = (XYPlot) jfreechart.getPlot();
	xyplot.setNoDataMessage("no data");
	xyplot.setNoDataMessageFont(new Font("微软雅黑", Font.BOLD, 14));
	xyplot.setNoDataMessagePaint(Color.blue);
	xyplot.setBackgroundPaint(Color.lightGray);

	TextTitle textTitle = jfreechart.getTitle();
	textTitle.setFont(new Font("宋体", Font.BOLD, 20));
	LegendTitle legend = jfreechart.getLegend();
	if (legend != null) {
		legend.setItemFont(new Font("宋体", Font.BOLD, 20));
	}

	XYLineAndShapeRenderer renderer = (XYLineAndShapeRenderer) xyplot.getRenderer();
	renderer.setBaseShapesVisible(true);
	renderer.setDrawOutlines(true);
	renderer.setSeriesOutlinePaint(0, Color.WHITE);  
	renderer.setUseOutlinePaint(true);  
	renderer.setSeriesOutlineStroke(1, new BasicStroke(0.5F));
	xyplot.setRenderer(renderer);

	NumberAxis numberaxis = (NumberAxis) xyplot.getDomainAxis();
	numberaxis.setTickMarkInsideLength(3.0F);  
    numberaxis.setTickMarkOutsideLength(0.0F); 
	numberaxis.setUpperBound(280000);
	numberaxis.setLowerBound(50000);
	
	numberaxis.setAxisLineStroke(new BasicStroke(1.5f));  

	NumberAxis numberaxis1 = (NumberAxis) xyplot.getRangeAxis();
	numberaxis1.setUpperBound(10.0);
	numberaxis1.setLowerBound(5.0);
	
	NumberTickUnit ntu1 = new NumberTickUnit(0.5);
	numberaxis1.setTickUnit(ntu1);
	
	return jfreechart;
}
 
开发者ID:metaotao,项目名称:doubanbook,代码行数:45,代码来源:ScatterPlotChart.java

示例6: BetaChart

import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer; //导入方法依赖的package包/类
public BetaChart( int maxItemCount ) {
    this.maxItemCount = maxItemCount;

    meanSeries = new XYSeries( "Raw Data" );
    lineSeries = new XYSeries( "Mean Values" );
    bestFitSeries = new XYSeries( "Best Fit" );
    xySeriesCollection = new XYSeriesCollection( meanSeries );
    xySeriesCollection.addSeries( lineSeries );
    xySeriesCollection.addSeries( bestFitSeries );

    domainAxis = new NumberAxis( "ln[(c-r)/c]" );
    rangeAxis = new NumberAxis( "ln(Order Parameter)" );
    renderer = new XYLineAndShapeRenderer();

    int RAW_DATA_SERIES = 0;
    int LINE_SERIES = 1;
    int BEST_FIT_SERIES = 2;
    renderer.setSeriesShape( RAW_DATA_SERIES, new Ellipse2D.Double( -3, -3, 6, 6 ) );
    renderer.setSeriesShape( LINE_SERIES, new Rectangle( -4, -4, 8, 8 ) );
    renderer.setSeriesLinesVisible( RAW_DATA_SERIES, false );
    renderer.setSeriesShapesVisible( RAW_DATA_SERIES, true );
    Color blue = new Color( 0, 0, 255, 14 );
    renderer.setSeriesPaint( RAW_DATA_SERIES, blue );
    renderer.setSeriesItemLabelPaint( RAW_DATA_SERIES, blue );
    renderer.setSeriesOutlinePaint( RAW_DATA_SERIES, blue );


    renderer.setSeriesLinesVisible( LINE_SERIES, true );


    renderer.setSeriesLinesVisible( BEST_FIT_SERIES, true );
    renderer.setSeriesShapesVisible( BEST_FIT_SERIES, false );
    renderer.setSeriesStroke( BEST_FIT_SERIES, new BasicStroke( 2 ) );
    renderer.setSeriesPaint( BEST_FIT_SERIES, Color.green );
    xyPlot = new XYPlot( xySeriesCollection,
                         domainAxis,
                         rangeAxis, renderer );
    chart = new JFreeChart( "Critical Exponent Log Plot", xyPlot );
    rangeAxis.setAutoRange( true );
    rangeAxis.setAutoRangeIncludesZero( false );

    domainAxis.setAutoRange( true );
    domainAxis.setAutoRangeIncludesZero( false );
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:45,代码来源:BetaChart.java


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