本文整理汇总了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;
}
示例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 );
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}