本文整理匯總了Java中org.jfree.chart.plot.XYPlot.setOutlinePaint方法的典型用法代碼示例。如果您正苦於以下問題:Java XYPlot.setOutlinePaint方法的具體用法?Java XYPlot.setOutlinePaint怎麽用?Java XYPlot.setOutlinePaint使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.jfree.chart.plot.XYPlot
的用法示例。
在下文中一共展示了XYPlot.setOutlinePaint方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createChart
import org.jfree.chart.plot.XYPlot; //導入方法依賴的package包/類
/**
* Creates a sample chart.
*
* @param dataset the dataset.
*
* @return A sample chart.
*/
private static JFreeChart createChart(VectorXYDataset dataset) {
NumberAxis xAxis = new NumberAxis("X");
xAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
xAxis.setLowerMargin(0.01);
xAxis.setUpperMargin(0.01);
xAxis.setAutoRangeIncludesZero(false);
NumberAxis yAxis = new NumberAxis("Y");
yAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
yAxis.setLowerMargin(0.01);
yAxis.setUpperMargin(0.01);
yAxis.setAutoRangeIncludesZero(false);
VectorRenderer renderer = new VectorRenderer();
renderer.setSeriesPaint(0, Color.blue);
XYPlot plot = new XYPlot(dataset, xAxis, yAxis, renderer);
plot.setBackgroundPaint(Color.lightGray);
plot.setDomainGridlinePaint(Color.white);
plot.setRangeGridlinePaint(Color.white);
plot.setAxisOffset(new RectangleInsets(5, 5, 5, 5));
plot.setOutlinePaint(Color.black);
JFreeChart chart = new JFreeChart("Vector Plot Demo 1", plot);
chart.setBackgroundPaint(Color.white);
return chart;
}