当前位置: 首页>>代码示例>>Java>>正文


Java NumberAxis.setLowerBound方法代码示例

本文整理汇总了Java中org.jfree.chart.axis.NumberAxis.setLowerBound方法的典型用法代码示例。如果您正苦于以下问题:Java NumberAxis.setLowerBound方法的具体用法?Java NumberAxis.setLowerBound怎么用?Java NumberAxis.setLowerBound使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.jfree.chart.axis.NumberAxis的用法示例。


在下文中一共展示了NumberAxis.setLowerBound方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testSetLowerBound

import org.jfree.chart.axis.NumberAxis; //导入方法依赖的package包/类
/**
 * Some checks for the setLowerBound() method.
 */
public void testSetLowerBound() {
    NumberAxis axis = new NumberAxis("X");
    axis.setRange(0.0, 10.0);
    axis.setLowerBound(5.0);
    assertEquals(5.0, axis.getLowerBound(), EPSILON);
    axis.setLowerBound(10.0);
    assertEquals(10.0, axis.getLowerBound(), EPSILON);
    assertEquals(11.0, axis.getUpperBound(), EPSILON);
    
    //axis.setRangeType(RangeType.POSITIVE);
    //axis.setLowerBound(-5.0);
    //assertEquals(0.0, axis.getLowerBound(), EPSILON);
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:17,代码来源:NumberAxisTests.java

示例2: 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;
}
 
开发者ID:metaotao,项目名称:doubanbook,代码行数:45,代码来源:ScatterPlotChart.java


注:本文中的org.jfree.chart.axis.NumberAxis.setLowerBound方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。