當前位置: 首頁>>代碼示例>>Java>>正文


Java XYLineAndShapeRenderer.setUseOutlinePaint方法代碼示例

本文整理匯總了Java中org.jfree.chart.renderer.xy.XYLineAndShapeRenderer.setUseOutlinePaint方法的典型用法代碼示例。如果您正苦於以下問題:Java XYLineAndShapeRenderer.setUseOutlinePaint方法的具體用法?Java XYLineAndShapeRenderer.setUseOutlinePaint怎麽用?Java XYLineAndShapeRenderer.setUseOutlinePaint使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.jfree.chart.renderer.xy.XYLineAndShapeRenderer的用法示例。


在下文中一共展示了XYLineAndShapeRenderer.setUseOutlinePaint方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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: addSerie

import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer; //導入方法依賴的package包/類
public void addSerie(int indexSerie, Color color, XYSeries localXYSeries){    	
        XYSeriesCollection localXYSeriesCollection = new XYSeriesCollection();
        localXYSeriesCollection.addSeries(localXYSeries);     //Se aniade la serie

        Ellipse2D.Double localDouble = new Ellipse2D.Double(-4.0D, -4.0D, 8.0D, 8.0D); //Forma de la anotacion del punto x,y
        
        XYLineAndShapeRenderer localXYLineAndShapeRenderer = new XYLineAndShapeRenderer();

        localXYLineAndShapeRenderer.setSeriesLinesVisible(indexSerie,true);        //provoca que se pinten lineas rectas que unen los puntos x,y que conforman la serie
        localXYLineAndShapeRenderer.setSeriesShapesVisible(indexSerie,false);       //provoca que se pinte la forma asociada al punto x,y       

        plot.setDataset(indexSerie, localXYSeriesCollection);  //Se aniade la serie al plot
        plot.setRenderer(indexSerie, localXYLineAndShapeRenderer);

        localXYLineAndShapeRenderer.setSeriesShape(indexSerie, new Ellipse2D.Double(-4.0, -4.0, 8.0, 8.0));
        
//        localXYLineAndShapeRenderer.setSeriesShape(indexSerie, localDouble);
        
        
        localXYLineAndShapeRenderer.setSeriesPaint(indexSerie, color);
        //localXYLineAndShapeRenderer.setSeriesFillPaint(indexSerie, Color.yellow);
        //localXYLineAndShapeRenderer.setSeriesOutlinePaint(indexSerie, Color.gray);
        localXYLineAndShapeRenderer.setUseFillPaint(false);//true
        localXYLineAndShapeRenderer.setUseOutlinePaint(false);//true
        localXYLineAndShapeRenderer.setDrawOutlines(false);
        localXYLineAndShapeRenderer.setDrawSeriesLineAsPath(true);                       
    }
 
開發者ID:Yarichi,項目名稱:Proyecto-DASI,代碼行數:28,代碼來源:VisualizacionJfreechart.java

示例3: addSerie

import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer; //導入方法依賴的package包/類
public void addSerie(int indexSerie, Color color, XYSeries localXYSeries){ 
        XYPlot plot=null;
        XYSeriesCollection localXYSeriesCollection = new XYSeriesCollection();
        localXYSeriesCollection.addSeries(localXYSeries);     //Se aniade la serie

        Ellipse2D.Double localDouble = new Ellipse2D.Double(-4.0D, -4.0D, 8.0D, 8.0D); //Forma de la anotacion del punto x,y
        
        XYLineAndShapeRenderer localXYLineAndShapeRenderer = new XYLineAndShapeRenderer();

        localXYLineAndShapeRenderer.setSeriesLinesVisible(indexSerie,true);        //provoca que se pinten lineas rectas que unen los puntos x,y que conforman la serie
        localXYLineAndShapeRenderer.setSeriesShapesVisible(indexSerie,false);       //provoca que se pinte la forma asociada al punto x,y       

        plot.setDataset(indexSerie, localXYSeriesCollection);  //Se aniade la serie al plot
        plot.setRenderer(indexSerie, localXYLineAndShapeRenderer);

        localXYLineAndShapeRenderer.setSeriesShape(indexSerie, new Ellipse2D.Double(-4.0, -4.0, 8.0, 8.0));
        
//        localXYLineAndShapeRenderer.setSeriesShape(indexSerie, localDouble);
        
        
        localXYLineAndShapeRenderer.setSeriesPaint(indexSerie, color);
        //localXYLineAndShapeRenderer.setSeriesFillPaint(indexSerie, Color.yellow);
        //localXYLineAndShapeRenderer.setSeriesOutlinePaint(indexSerie, Color.gray);
        localXYLineAndShapeRenderer.setUseFillPaint(false);//true
        localXYLineAndShapeRenderer.setUseOutlinePaint(false);//true
        localXYLineAndShapeRenderer.setDrawOutlines(false);
        localXYLineAndShapeRenderer.setDrawSeriesLineAsPath(true);                       
    }
 
開發者ID:Yarichi,項目名稱:Proyecto-DASI,代碼行數:29,代碼來源:VisualizacionJfreechart.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: testEquals

import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer; //導入方法依賴的package包/類
/**
 * Problem that the equals(...) method distinguishes all fields.
 */
public void testEquals() {
    XYLineAndShapeRenderer r1 = new XYLineAndShapeRenderer();
    XYLineAndShapeRenderer r2 = new XYLineAndShapeRenderer();
    assertEquals(r1, r2);
    assertEquals(r2, r1);

    r1.setLinesVisible(true);
    assertFalse(r1.equals(r2));
    r2.setLinesVisible(true);
    assertTrue(r1.equals(r2));
    
    r1.setSeriesLinesVisible(3, true);
    assertFalse(r1.equals(r2));
    r2.setSeriesLinesVisible(3, true);
    assertTrue(r1.equals(r2));
    
    r1.setDefaultLinesVisible(false);
    assertFalse(r1.equals(r2));
    r2.setDefaultLinesVisible(false);
    assertTrue(r1.equals(r2));
    
    r1.setShapesVisible(true);
    assertFalse(r1.equals(r2));
    r2.setShapesVisible(true);
    assertTrue(r1.equals(r2));
    
    r1.setSeriesShapesVisible(3, true);
    assertFalse(r1.equals(r2));
    r2.setSeriesShapesVisible(3, true);
    assertTrue(r1.equals(r2));
    
    r1.setDefaultShapesVisible(false);
    assertFalse(r1.equals(r2));
    r2.setDefaultShapesVisible(false);
    assertTrue(r1.equals(r2));
    
    r1.setShapesFilled(true);
    assertFalse(r1.equals(r2));
    r2.setShapesFilled(true);
    assertTrue(r1.equals(r2));
    
    r1.setSeriesShapesFilled(3, true);
    assertFalse(r1.equals(r2));
    r2.setSeriesShapesFilled(3, true);
    assertTrue(r1.equals(r2));
    
    r1.setDefaultShapesFilled(false);
    assertFalse(r1.equals(r2));
    r2.setDefaultShapesFilled(false);
    assertTrue(r1.equals(r2));

    r1.setDrawOutlines(true);
    assertFalse(r1.equals(r2));
    r2.setDrawOutlines(true);
    assertTrue(r1.equals(r2));

    r1.setUseOutlinePaint(true);
    assertFalse(r1.equals(r2));
    r2.setUseOutlinePaint(true);
    assertTrue(r1.equals(r2));
}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:65,代碼來源:XYLineAndShapeRendererTests.java

示例7: testEquals

import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer; //導入方法依賴的package包/類
/**
 * Test that the equals() method distinguishes all fields.
 */
public void testEquals() {
    
    XYLineAndShapeRenderer r1 = new XYLineAndShapeRenderer();
    XYLineAndShapeRenderer r2 = new XYLineAndShapeRenderer();
    assertEquals(r1, r2);
    assertEquals(r2, r1);

    r1.setLinesVisible(true);
    assertFalse(r1.equals(r2));
    r2.setLinesVisible(true);
    assertTrue(r1.equals(r2));
    
    r1.setSeriesLinesVisible(3, true);
    assertFalse(r1.equals(r2));
    r2.setSeriesLinesVisible(3, true);
    assertTrue(r1.equals(r2));
    
    r1.setBaseLinesVisible(false);
    assertFalse(r1.equals(r2));
    r2.setBaseLinesVisible(false);
    assertTrue(r1.equals(r2));
    
    r1.setLegendLine(new Line2D.Double(1.0, 2.0, 3.0, 4.0));
    assertFalse(r1.equals(r2));
    r2.setLegendLine(new Line2D.Double(1.0, 2.0, 3.0, 4.0));
    assertTrue(r1.equals(r2));
    
    r1.setShapesVisible(true);
    assertFalse(r1.equals(r2));
    r2.setShapesVisible(true);
    assertTrue(r1.equals(r2));
    
    r1.setSeriesShapesVisible(3, true);
    assertFalse(r1.equals(r2));
    r2.setSeriesShapesVisible(3, true);
    assertTrue(r1.equals(r2));
    
    r1.setBaseShapesVisible(false);
    assertFalse(r1.equals(r2));
    r2.setBaseShapesVisible(false);
    assertTrue(r1.equals(r2));
    
    r1.setShapesFilled(true);
    assertFalse(r1.equals(r2));
    r2.setShapesFilled(true);
    assertTrue(r1.equals(r2));
    
    r1.setSeriesShapesFilled(3, true);
    assertFalse(r1.equals(r2));
    r2.setSeriesShapesFilled(3, true);
    assertTrue(r1.equals(r2));
    
    r1.setBaseShapesFilled(false);
    assertFalse(r1.equals(r2));
    r2.setBaseShapesFilled(false);
    assertTrue(r1.equals(r2));

    r1.setDrawOutlines(!r1.getDrawOutlines());
    assertFalse(r1.equals(r2));
    r2.setDrawOutlines(r1.getDrawOutlines());
    assertTrue(r1.equals(r2));

    r1.setUseOutlinePaint(true);
    assertFalse(r1.equals(r2));
    r2.setUseOutlinePaint(true);
    assertTrue(r1.equals(r2));
    
    r1.setUseFillPaint(true);
    assertFalse(r1.equals(r2));
    r2.setUseFillPaint(true);
    assertTrue(r1.equals(r2));
    
    r1.setDrawSeriesLineAsPath(true);
    assertFalse(r1.equals(r2));
    r2.setDrawSeriesLineAsPath(true);
    assertTrue(r1.equals(r2));
}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:81,代碼來源:XYLineAndShapeRendererTests.java


注:本文中的org.jfree.chart.renderer.xy.XYLineAndShapeRenderer.setUseOutlinePaint方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。