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


Java XYLineAndShapeRenderer.setStroke方法代码示例

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


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

示例5: 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

示例6: 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

示例7: 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.setStroke方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。