本文整理汇总了Java中org.jfree.chart.plot.CombinedRangeCategoryPlot.add方法的典型用法代码示例。如果您正苦于以下问题:Java CombinedRangeCategoryPlot.add方法的具体用法?Java CombinedRangeCategoryPlot.add怎么用?Java CombinedRangeCategoryPlot.add使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jfree.chart.plot.CombinedRangeCategoryPlot
的用法示例。
在下文中一共展示了CombinedRangeCategoryPlot.add方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createPlot
import org.jfree.chart.plot.CombinedRangeCategoryPlot; //导入方法依赖的package包/类
/**
* Creates a sample plot.
*
* @return A plot.
*/
private CombinedRangeCategoryPlot createPlot() {
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);
NumberAxis rangeAxis = new NumberAxis("Value");
CombinedRangeCategoryPlot plot = new CombinedRangeCategoryPlot(rangeAxis);
plot.add(subplot1, 2);
plot.add(subplot2, 1);
return plot;
}
示例2: testRemoveSubplot
import org.jfree.chart.plot.CombinedRangeCategoryPlot; //导入方法依赖的package包/类
/**
* This is a test to replicate the bug report 1121172.
*/
public void testRemoveSubplot() {
CombinedRangeCategoryPlot plot = new CombinedRangeCategoryPlot();
CategoryPlot plot1 = new CategoryPlot();
CategoryPlot plot2 = new CategoryPlot();
CategoryPlot plot3 = new CategoryPlot();
plot.add(plot1);
plot.add(plot2);
plot.add(plot3);
plot.remove(plot2);
List plots = plot.getSubplots();
assertEquals(2, plots.size());
}
示例3: createPlot
import org.jfree.chart.plot.CombinedRangeCategoryPlot; //导入方法依赖的package包/类
/**
* Creates a sample plot.
*
* @return A plot.
*/
private CombinedRangeCategoryPlot createPlot() {
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);
NumberAxis rangeAxis = new NumberAxis("Value");
CombinedRangeCategoryPlot plot
= new CombinedRangeCategoryPlot(rangeAxis);
plot.add(subplot1, 2);
plot.add(subplot2, 1);
return plot;
}
示例4: createPlot
import org.jfree.chart.plot.CombinedRangeCategoryPlot; //导入方法依赖的package包/类
/**
* Creates a sample plot.
*
* @return A plot.
*/
private CombinedRangeCategoryPlot createPlot() {
CategoryDataset dataset1 = createDataset1();
CategoryAxis catAxis1 = new CategoryAxis("Category");
LineAndShapeRenderer renderer1 = new LineAndShapeRenderer();
renderer1.setBaseToolTipGenerator(
new StandardCategoryToolTipGenerator());
CategoryPlot subplot1 = new CategoryPlot(dataset1, catAxis1, null,
renderer1);
subplot1.setDomainGridlinesVisible(true);
CategoryDataset dataset2 = createDataset2();
CategoryAxis catAxis2 = new CategoryAxis("Category");
BarRenderer renderer2 = new BarRenderer();
renderer2.setBaseToolTipGenerator(
new StandardCategoryToolTipGenerator());
CategoryPlot subplot2 = new CategoryPlot(dataset2, catAxis2, null,
renderer2);
subplot2.setDomainGridlinesVisible(true);
NumberAxis rangeAxis = new NumberAxis("Value");
CombinedRangeCategoryPlot plot = new CombinedRangeCategoryPlot(
rangeAxis);
plot.add(subplot1, 2);
plot.add(subplot2, 1);
return plot;
}