本文整理了Java中org.jfree.chart.plot.XYPlot.setOrientation()
方法的一些代码示例,展示了XYPlot.setOrientation()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XYPlot.setOrientation()
方法的具体详情如下:
包路径:org.jfree.chart.plot.XYPlot
类名称:XYPlot
方法名:setOrientation
[英]Sets the orientation for the plot and sends a PlotChangeEvent to all registered listeners.
[中]设置打印方向,并向所有注册的侦听器发送PlotChangeEvent。
代码示例来源:origin: kiegroup/optaplanner
private XYPlot createPlot(BenchmarkReport benchmarkReport) {
Locale locale = benchmarkReport.getLocale();
NumberAxis xAxis = new NumberAxis("Time spent");
xAxis.setNumberFormatOverride(new MillisecondsSpentNumberFormat(locale));
NumberAxis yAxis = new NumberAxis("Best solution mutation count");
yAxis.setNumberFormatOverride(NumberFormat.getInstance(locale));
yAxis.setAutoRangeIncludesZero(true);
XYPlot plot = new XYPlot(null, xAxis, yAxis, null);
plot.setOrientation(PlotOrientation.VERTICAL);
return plot;
}
代码示例来源:origin: kiegroup/optaplanner
private XYPlot createPlot(BenchmarkReport benchmarkReport, int scoreLevelIndex) {
Locale locale = benchmarkReport.getLocale();
NumberAxis xAxis = new NumberAxis("Time spent");
xAxis.setNumberFormatOverride(new MillisecondsSpentNumberFormat(locale));
String scoreLevelLabel = problemBenchmarkResult.findScoreLevelLabel(scoreLevelIndex);
NumberAxis yAxis = new NumberAxis("Step " + scoreLevelLabel);
yAxis.setNumberFormatOverride(NumberFormat.getInstance(locale));
yAxis.setAutoRangeIncludesZero(false);
XYPlot plot = new XYPlot(null, xAxis, yAxis, null);
plot.setOrientation(PlotOrientation.VERTICAL);
return plot;
}
代码示例来源:origin: kiegroup/optaplanner
private XYPlot createPlot(BenchmarkReport benchmarkReport, int scoreLevelIndex) {
Locale locale = benchmarkReport.getLocale();
NumberAxis xAxis = new NumberAxis("Time spent");
xAxis.setNumberFormatOverride(new MillisecondsSpentNumberFormat(locale));
String scoreLevelLabel = problemBenchmarkResult.findScoreLevelLabel(scoreLevelIndex);
NumberAxis yAxis = new NumberAxis("Best " + scoreLevelLabel);
yAxis.setNumberFormatOverride(NumberFormat.getInstance(locale));
yAxis.setAutoRangeIncludesZero(false);
XYPlot plot = new XYPlot(null, xAxis, yAxis, null);
plot.setOrientation(PlotOrientation.VERTICAL);
return plot;
}
代码示例来源:origin: kiegroup/optaplanner
private XYPlot createPlot(BenchmarkReport benchmarkReport, int scoreLevelIndex) {
Locale locale = benchmarkReport.getLocale();
NumberAxis xAxis = new NumberAxis("Time spent");
xAxis.setNumberFormatOverride(new MillisecondsSpentNumberFormat(locale));
String scoreLevelLabel = subSingleBenchmarkResult.getSingleBenchmarkResult().getProblemBenchmarkResult()
.findScoreLevelLabel(scoreLevelIndex);
NumberAxis yAxis = new NumberAxis("Constraint match total " + scoreLevelLabel);
yAxis.setNumberFormatOverride(NumberFormat.getInstance(locale));
yAxis.setAutoRangeIncludesZero(false);
XYPlot plot = new XYPlot(null, xAxis, yAxis, null);
plot.setOrientation(PlotOrientation.VERTICAL);
return plot;
}
代码示例来源:origin: kiegroup/optaplanner
private XYPlot createPlot(BenchmarkReport benchmarkReport, int scoreLevelIndex) {
Locale locale = benchmarkReport.getLocale();
NumberAxis xAxis = new NumberAxis("Time spent");
xAxis.setNumberFormatOverride(new MillisecondsSpentNumberFormat(locale));
String scoreLevelLabel = subSingleBenchmarkResult.getSingleBenchmarkResult().getProblemBenchmarkResult()
.findScoreLevelLabel(scoreLevelIndex);
NumberAxis yAxis = new NumberAxis("Constraint match total " + scoreLevelLabel);
yAxis.setNumberFormatOverride(NumberFormat.getInstance(locale));
yAxis.setAutoRangeIncludesZero(false);
XYPlot plot = new XYPlot(null, xAxis, yAxis, null);
plot.setOrientation(PlotOrientation.VERTICAL);
return plot;
}
代码示例来源:origin: kiegroup/optaplanner
private XYPlot createPlot(BenchmarkReport benchmarkReport, int scoreLevelIndex) {
Locale locale = benchmarkReport.getLocale();
NumberAxis xAxis = new NumberAxis("Time spent");
xAxis.setNumberFormatOverride(new MillisecondsSpentNumberFormat(locale));
String scoreLevelLabel = subSingleBenchmarkResult.getSingleBenchmarkResult().getProblemBenchmarkResult()
.findScoreLevelLabel(scoreLevelIndex);
NumberAxis yAxis = new NumberAxis("Step " + scoreLevelLabel + " diff");
yAxis.setNumberFormatOverride(NumberFormat.getInstance(locale));
yAxis.setAutoRangeIncludesZero(true);
XYPlot plot = new XYPlot(null, xAxis, yAxis, null);
plot.setOrientation(PlotOrientation.VERTICAL);
return plot;
}
代码示例来源:origin: kiegroup/optaplanner
private XYPlot createPlot(BenchmarkReport benchmarkReport, int scoreLevelIndex) {
Locale locale = benchmarkReport.getLocale();
NumberAxis xAxis = new NumberAxis("Time spent");
xAxis.setNumberFormatOverride(new MillisecondsSpentNumberFormat(locale));
String scoreLevelLabel = subSingleBenchmarkResult.getSingleBenchmarkResult().getProblemBenchmarkResult()
.findScoreLevelLabel(scoreLevelIndex);
NumberAxis yAxis = new NumberAxis("Best " + scoreLevelLabel + " diff");
yAxis.setNumberFormatOverride(NumberFormat.getInstance(locale));
yAxis.setAutoRangeIncludesZero(true);
XYPlot plot = new XYPlot(null, xAxis, yAxis, null);
plot.setOrientation(PlotOrientation.VERTICAL);
return plot;
}
代码示例来源:origin: kiegroup/optaplanner
rangeAxis.setRange(-0.5, maximumEndDate + 0.5);
XYPlot plot = new XYPlot(seriesCollection, domainAxis, rangeAxis, renderer);
plot.setOrientation(PlotOrientation.HORIZONTAL);
return new JFreeChart("Project Job Scheduling", JFreeChart.DEFAULT_TITLE_FONT,
plot, true);
代码示例来源:origin: kiegroup/optaplanner
private XYPlot createScalabilityPlot(List<XYSeries> seriesList,
String xAxisLabel, NumberFormat xAxisNumberFormat,
String yAxisLabel, NumberFormat yAxisNumberFormat) {
NumberAxis xAxis;
if (useLogarithmicProblemScale(seriesList)) {
LogarithmicAxis logarithmicAxis = new LogarithmicAxis(xAxisLabel + " (logarithmic)");
logarithmicAxis.setAllowNegativesFlag(true);
xAxis = logarithmicAxis;
} else {
xAxis = new NumberAxis(xAxisLabel);
}
xAxis.setNumberFormatOverride(xAxisNumberFormat);
NumberAxis yAxis = new NumberAxis(yAxisLabel);
yAxis.setNumberFormatOverride(yAxisNumberFormat);
XYPlot plot = new XYPlot(null, xAxis, yAxis, null);
int seriesIndex = 0;
for (XYSeries series : seriesList) {
XYSeriesCollection seriesCollection = new XYSeriesCollection();
seriesCollection.addSeries(series);
plot.setDataset(seriesIndex, seriesCollection);
XYItemRenderer renderer = createScalabilityPlotRenderer(yAxisNumberFormat);
plot.setRenderer(seriesIndex, renderer);
seriesIndex++;
}
plot.setOrientation(PlotOrientation.VERTICAL);
return plot;
}
代码示例来源:origin: kiegroup/optaplanner
yAxis.setAutoRangeIncludesZero(false);
XYPlot plot = new XYPlot(null, xAxis, yAxis, null);
plot.setOrientation(PlotOrientation.VERTICAL);
int seriesIndex = 0;
for (SingleBenchmarkResult singleBenchmarkResult : problemBenchmarkResult.getSingleBenchmarkResultList()) {
代码示例来源:origin: kiegroup/optaplanner
yAxis.setNumberFormatOverride(NumberFormat.getInstance(locale));
XYPlot plot = new XYPlot(null, xAxis, yAxis, null);
plot.setOrientation(PlotOrientation.VERTICAL);
int seriesIndex = 0;
for (SingleBenchmarkResult singleBenchmarkResult : problemBenchmarkResult.getSingleBenchmarkResultList()) {
代码示例来源:origin: kiegroup/optaplanner
XYPlot plot = new XYPlot(null, xAxis, yAxis, null);
DrawingSupplier drawingSupplier = new DefaultDrawingSupplier();
plot.setOrientation(PlotOrientation.VERTICAL);
代码示例来源:origin: jfree/jfreechart
/**
* Sets the orientation for the plot (also changes the orientation for all
* the subplots to match).
*
* @param orientation the orientation ({@code null} not allowed).
*/
@Override
public void setOrientation(PlotOrientation orientation) {
super.setOrientation(orientation);
for (XYPlot p : this.subplots) {
p.setOrientation(orientation);
}
}
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
/**
* Sets the orientation for the plot (also changes the orientation for all
* the subplots to match).
*
* @param orientation the orientation (<code>null</code> not allowed).
*/
public void setOrientation(PlotOrientation orientation) {
super.setOrientation(orientation);
Iterator iterator = this.subplots.iterator();
while (iterator.hasNext()) {
XYPlot plot = (XYPlot) iterator.next();
plot.setOrientation(orientation);
}
}
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
/**
* Sets the orientation for the plot (and all its subplots).
*
* @param orientation the orientation.
*/
public void setOrientation(PlotOrientation orientation) {
super.setOrientation(orientation);
Iterator iterator = this.subplots.iterator();
while (iterator.hasNext()) {
XYPlot plot = (XYPlot) iterator.next();
plot.setOrientation(orientation);
}
}
代码示例来源:origin: stackoverflow.com
private static JFreeChart createClusteredChart(String title, String categoryAxisLabel, String valueAxisLabel, IntervalXYDataset dataset) {
NumberAxis domainAxis = new NumberAxis(categoryAxisLabel);
domainAxis.setAutoRangeIncludesZero(false);
ValueAxis valueAxis = new NumberAxis(valueAxisLabel);
XYBarRenderer renderer = new ClusteredXYBarRenderer();
XYPlot plot = new XYPlot(dataset, domainAxis, valueAxis, renderer);
plot.setOrientation(PlotOrientation.VERTICAL);
JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, true);
return chart;
}
代码示例来源:origin: com.anrisoftware.prefdialog/prefdialog-misc-swing
@OnAwt
@Override
public void setPlotOrientation(PlotOrientation orientation) {
PlotOrientation oldValue = this.orientation;
if (oldValue == orientation) {
return;
}
this.orientation = orientation;
XYPlot plot = (XYPlot) chart.getPlot();
plot.setOrientation(toFreechartOrientation(orientation));
}
代码示例来源:origin: afranken/jmeter-analysis-maven-plugin
public static XYPlot createResponseTimesPlot(String domainAxisName) {
XYPlot plot = createPlot(createNumberAxis(domainAxisName), createPercentileAxis("Percentiles (%)"), createNumberAxis("Count"));
plot.setOrientation(PlotOrientation.HORIZONTAL);
return plot;
}
代码示例来源:origin: eu.limetri.client/mapviewer-weather
private JFreeChart createBarChart(String title, String xAxisLabel,
String yAxisLabel, XYDataset dataset, boolean legend) {
DateAxis xAxis = new DateAxis(xAxisLabel);
xAxis.setDateFormatOverride(AXIS_DATE_FORMAT);
NumberAxis yAxis = new NumberAxis(yAxisLabel);
XYBarRenderer renderer = new XYBarRenderer();
renderer.setShadowVisible(false);
XYPlot plot = new XYPlot(dataset, xAxis, yAxis, renderer);
plot.setOrientation(PlotOrientation.VERTICAL);
return new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend);
}
}
代码示例来源:origin: eu.limetri.client/mapviewer-weather
private JFreeChart createXYLineChart(String title, String xAxisLabel,
String yAxisLabel, XYDataset dataset, boolean legend, boolean includeZero) {
DateAxis xAxis = new DateAxis(xAxisLabel);
xAxis.setDateFormatOverride(AXIS_DATE_FORMAT);
NumberAxis yAxis = new NumberAxis(yAxisLabel);
yAxis.setAutoRangeIncludesZero(includeZero);
XYItemRenderer renderer = new XYLineAndShapeRenderer(true, false);
XYPlot plot = new XYPlot(dataset, xAxis, yAxis, renderer);
plot.setOrientation(PlotOrientation.VERTICAL);
return new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend);
}
内容来源于网络,如有侵权,请联系作者删除!