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


Java XYLineAndShapeRenderer.setPaint方法代碼示例

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


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

示例1: createChart

import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer; //導入方法依賴的package包/類
public static JFreeChart createChart( XYDataset dataset, String xaxis, String yaxis ) {
    JFreeChart chart = ChartFactory.createScatterPlot(
            "",  // title
            xaxis,             // x-axis label
            yaxis,   // y-axis label
            dataset,            // data
            PlotOrientation.VERTICAL,
            false,               // create legend?
            false,               // generate tooltips?
            false               // generate URLs?
    );

    XYPlot plot = (XYPlot) chart.getPlot();
    plot.getRangeAxis().setAutoRange( false );
    plot.getRangeAxis().setRange( -3, 3 );
    plot.getDomainAxis().setRange( 0, 100 );
    XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer( true, false );
    renderer.setStroke( new BasicStroke( 2, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 1 ) );
    renderer.setPaint( Color.blue );
    plot.setRenderer( renderer );
    return chart;
}
 
開發者ID:mleoking,項目名稱:PhET,代碼行數:23,代碼來源:StripChartJFCNode.java

示例2: JFreeChartIcon

import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer; //導入方法依賴的package包/類
public JFreeChartIcon() {
        XYSeries series = new XYSeries( "" );
        for ( int i = 0; i < 100; i++ ) {
            series.add( i, Math.sin( i / 10.0 ) );
        }
        dataset = new XYSeriesCollection( series );
        JFreeChart jFreeChart = ChartFactory.createXYLineChart( WIStrings.getString( "chart.chart" ), "", "", dataset, PlotOrientation.VERTICAL, false, false, false );
//        jFreeChart.getXYPlot().getRangeAxis().setTickLabelsVisible( false );
//        jFreeChart.getXYPlot().getDomainAxis().setTickLabelsVisible( false );
        BasicStroke stroke = new BasicStroke( 4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 1, new float[] { 5, 1 }, 0 );
//        BasicStroke stroke = new BasicStroke( 5 );
        jFreeChart.getXYPlot().setRangeGridlineStroke( stroke );
        jFreeChart.getXYPlot().setRangeGridlinePaint( Color.black );
        jFreeChart.getXYPlot().setDomainGridlineStroke( stroke );
        jFreeChart.getXYPlot().setDomainGridlinePaint( Color.black );
        jFreeChart.setAntiAlias( true );
        XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer( true, false );
        renderer.setPaint( Color.blue );
        renderer.setStroke( new BasicStroke( 10 ) );
//        renderer.set
        jFreeChart.getXYPlot().setRenderer( renderer );
        ChartFrame chartFrame = new ChartFrame( "", jFreeChart );
        chartFrame.setSize( 200, 200 );
        chartFrame.setVisible( true );
        chartFrame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
    }
 
開發者ID:mleoking,項目名稱:PhET,代碼行數:27,代碼來源:JFreeChartIcon.java

示例3: createChart

import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer; //導入方法依賴的package包/類
public static JFreeChart createChart( XYDataset dataset, String xaxis, String yaxis ) {
    JFreeChart chart = ChartFactory.createScatterPlot(
            "",  // title
            xaxis,             // x-axis label
            yaxis,   // y-axis label
            dataset,            // data
            PlotOrientation.VERTICAL,
            false,               // create legend?
            false,               // generate tooltips?
            false               // generate URLs?
    );

    XYPlot plot = (XYPlot) chart.getPlot();
    plot.getRangeAxis().setTickLabelsVisible( false );
    plot.getRangeAxis().setAutoRange( false );
    plot.getRangeAxis().setRange( -1, 1 );
    XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer( true, false );
    renderer.setStroke( new BasicStroke( 2, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 1 ) );
    renderer.setPaint( Color.blue );
    plot.setRenderer( renderer );
    return chart;
}
 
開發者ID:mleoking,項目名稱:PhET,代碼行數:23,代碼來源:StripChartJFCNode.java

示例4: getRenderer0

import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer; //導入方法依賴的package包/類
private XYLineAndShapeRenderer getRenderer0() {
	// TODO Auto-generated method stub
	XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer();
	renderer.setShapesVisible(false); 
	renderer.setShapesFilled(false);
	renderer.setPaint(Color.gray);
	return renderer;
}
 
開發者ID:c-zhou,項目名稱:polyGembler,代碼行數:9,代碼來源:JfreeChart.java

示例5: getRenderer1

import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer; //導入方法依賴的package包/類
private XYLineAndShapeRenderer getRenderer1() {
	// TODO Auto-generated method stub
	XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer();
	renderer.setPaint(Color.decode(hex_str[4]));
	renderer.setShapesVisible(true);
	renderer.setShapesFilled(true);
	renderer.setShape(shape);
	return renderer;
}
 
開發者ID:c-zhou,項目名稱:polyGembler,代碼行數:10,代碼來源:JfreeChart.java

示例6: getRenderer2

import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer; //導入方法依賴的package包/類
private XYLineAndShapeRenderer getRenderer2() {
	// TODO Auto-generated method stub
	XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer();
	renderer.setStroke(new BasicStroke(stroke));
	renderer.setPaint(Color.DARK_GRAY);
	renderer.setShapesVisible(false);
	renderer.setShapesFilled(false);
	return renderer;
}
 
開發者ID:c-zhou,項目名稱:polyGembler,代碼行數:10,代碼來源:JfreeChart.java

示例7: getRenderer3

import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer; //導入方法依賴的package包/類
private XYLineAndShapeRenderer getRenderer3() {
	// TODO Auto-generated method stub
	XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer();
	renderer.setStroke(new BasicStroke(stroke));
	renderer.setPaint(Color.DARK_GRAY);
	renderer.setShapesVisible(false);
	renderer.setShapesFilled(false);
	return renderer;
}
 
開發者ID:c-zhou,項目名稱:polyGembler,代碼行數:10,代碼來源:JfreeChart.java

示例8: getRenderer4

import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer; //導入方法依賴的package包/類
private XYItemRenderer getRenderer4() {
	// TODO Auto-generated method stub
	XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer();
	renderer.setStroke(new BasicStroke(stroke/4));
	Color c = Color.decode(hex_str[0]);
	renderer.setPaint(c);
	renderer.setShapesVisible(false);
	renderer.setShapesFilled(false);
	return renderer;
}
 
開發者ID:c-zhou,項目名稱:polyGembler,代碼行數:11,代碼來源:JfreeChart.java

示例9: getRenderer5

import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer; //導入方法依賴的package包/類
private XYLineAndShapeRenderer getRenderer5() {
	// TODO Auto-generated method stub
	XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer();
	renderer.setStroke(new BasicStroke(3));
	renderer.setPaint(Color.DARK_GRAY);
	renderer.setShapesVisible(false);
	renderer.setShapesFilled(false);
	return renderer;
}
 
開發者ID:c-zhou,項目名稱:polyGembler,代碼行數:10,代碼來源:JfreeChart.java


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