本文整理汇总了Java中org.jfree.chart.axis.NumberAxis.setTickMarkOutsideLength方法的典型用法代码示例。如果您正苦于以下问题:Java NumberAxis.setTickMarkOutsideLength方法的具体用法?Java NumberAxis.setTickMarkOutsideLength怎么用?Java NumberAxis.setTickMarkOutsideLength使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jfree.chart.axis.NumberAxis
的用法示例。
在下文中一共展示了NumberAxis.setTickMarkOutsideLength方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createChart
import org.jfree.chart.axis.NumberAxis; //导入方法依赖的package包/类
public static JFreeChart createChart(XYDataset xydataset, String shou, String shu) {
JFreeChart jfreechart = ChartFactory.createScatterPlot("Rating and Rating People Distribution", shou, shu,
xydataset, PlotOrientation.VERTICAL, true, false, false);
jfreechart.setBackgroundPaint(Color.white);
jfreechart.setBorderPaint(Color.GREEN);
XYPlot xyplot = (XYPlot) jfreechart.getPlot();
xyplot.setNoDataMessage("no data");
xyplot.setNoDataMessageFont(new Font("微软雅黑", Font.BOLD, 14));
xyplot.setNoDataMessagePaint(Color.blue);
xyplot.setBackgroundPaint(Color.lightGray);
TextTitle textTitle = jfreechart.getTitle();
textTitle.setFont(new Font("宋体", Font.BOLD, 20));
LegendTitle legend = jfreechart.getLegend();
if (legend != null) {
legend.setItemFont(new Font("宋体", Font.BOLD, 20));
}
XYLineAndShapeRenderer renderer = (XYLineAndShapeRenderer) xyplot.getRenderer();
renderer.setBaseShapesVisible(true);
renderer.setDrawOutlines(true);
renderer.setSeriesOutlinePaint(0, Color.WHITE);
renderer.setUseOutlinePaint(true);
renderer.setSeriesOutlineStroke(1, new BasicStroke(0.5F));
xyplot.setRenderer(renderer);
NumberAxis numberaxis = (NumberAxis) xyplot.getDomainAxis();
numberaxis.setTickMarkInsideLength(3.0F);
numberaxis.setTickMarkOutsideLength(0.0F);
numberaxis.setUpperBound(280000);
numberaxis.setLowerBound(50000);
numberaxis.setAxisLineStroke(new BasicStroke(1.5f));
NumberAxis numberaxis1 = (NumberAxis) xyplot.getRangeAxis();
numberaxis1.setUpperBound(10.0);
numberaxis1.setLowerBound(5.0);
NumberTickUnit ntu1 = new NumberTickUnit(0.5);
numberaxis1.setTickUnit(ntu1);
return jfreechart;
}