本文整理匯總了Java中org.jfree.chart.plot.XYPlot.setRangeAxis方法的典型用法代碼示例。如果您正苦於以下問題:Java XYPlot.setRangeAxis方法的具體用法?Java XYPlot.setRangeAxis怎麽用?Java XYPlot.setRangeAxis使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.jfree.chart.plot.XYPlot
的用法示例。
在下文中一共展示了XYPlot.setRangeAxis方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createChart
import org.jfree.chart.plot.XYPlot; //導入方法依賴的package包/類
private static JFreeChart createChart(XYDataset dataset) {
JFreeChart chart = ChartFactory.createScatterPlot(
"Log Axis Demo 1",
"X",
"Y",
dataset,
PlotOrientation.VERTICAL,
true,
true,
false
);
XYPlot plot = (XYPlot) chart.getPlot();
LogAxis xAxis = new LogAxis("X");
LogAxis yAxis = new LogAxis("Y");
plot.setDomainAxis(xAxis);
plot.setRangeAxis(yAxis);
return chart;
}
示例2: addCashFlowAxis
import org.jfree.chart.plot.XYPlot; //導入方法依賴的package包/類
/**
* Adds the cash flow axis to the plot.
* @param plot the plot
* @param dataset the cash flow dataset
*/
private static void addCashFlowAxis(XYPlot plot, TimeSeriesCollection dataset) {
final NumberAxis cashAxis = new NumberAxis("Cash Flow Ratio");
cashAxis.setAutoRangeIncludesZero(false);
plot.setRangeAxis(1, cashAxis);
plot.setDataset(1, dataset);
plot.mapDatasetToRangeAxis(1, 1);
final StandardXYItemRenderer cashFlowRenderer = new StandardXYItemRenderer();
cashFlowRenderer.setSeriesPaint(0, Color.blue);
plot.setRenderer(1, cashFlowRenderer);
}