本文整理匯總了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;
}