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