本文整理汇总了Java中org.jfree.experimental.chart.plot.CombinedCategoryPlot类的典型用法代码示例。如果您正苦于以下问题:Java CombinedCategoryPlot类的具体用法?Java CombinedCategoryPlot怎么用?Java CombinedCategoryPlot使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CombinedCategoryPlot类属于org.jfree.experimental.chart.plot包,在下文中一共展示了CombinedCategoryPlot类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createChart
import org.jfree.experimental.chart.plot.CombinedCategoryPlot; //导入依赖的package包/类
/**
* Creates a chart.
*
* @return A chart.
*/
private static JFreeChart createChart() {
CategoryDataset dataset1 = createDataset1();
NumberAxis rangeAxis1 = new NumberAxis("Value");
rangeAxis1.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
LineAndShapeRenderer renderer1 = new LineAndShapeRenderer();
renderer1.setBaseToolTipGenerator(
new StandardCategoryToolTipGenerator());
CategoryPlot subplot1 = new CategoryPlot(dataset1, null, rangeAxis1,
renderer1);
subplot1.setDomainGridlinesVisible(true);
CategoryDataset dataset2 = createDataset2();
NumberAxis rangeAxis2 = new NumberAxis("Value");
rangeAxis2.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
BarRenderer renderer2 = new BarRenderer();
renderer2.setBaseToolTipGenerator(
new StandardCategoryToolTipGenerator());
CategoryPlot subplot2 = new CategoryPlot(dataset2, null, rangeAxis2,
renderer2);
subplot2.setDomainGridlinesVisible(true);
CategoryAxis domainAxis = new CategoryAxis("Category");
CombinedCategoryPlot plot = new CombinedCategoryPlot(
domainAxis, new NumberAxis("Range"));
plot.add(subplot1, 2);
plot.add(subplot2, 1);
JFreeChart result = new JFreeChart(
"Combined Domain Category Plot Demo",
new Font("SansSerif", Font.BOLD, 12), plot, true);
return result;
}
开发者ID:mdzio,项目名称:ccu-historian,代码行数:40,代码来源:CombinedCategoryPlotDemo1.java
注:本文中的org.jfree.experimental.chart.plot.CombinedCategoryPlot类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论