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; }
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; }
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; }
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; }
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; }
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; }
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; }
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);
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; }
yAxis.setAutoRangeIncludesZero(false); XYPlot plot = new XYPlot(null, xAxis, yAxis, null); plot.setOrientation(PlotOrientation.VERTICAL); int seriesIndex = 0; for (SingleBenchmarkResult singleBenchmarkResult : problemBenchmarkResult.getSingleBenchmarkResultList()) {
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()) {
XYPlot plot = new XYPlot(null, xAxis, yAxis, null); DrawingSupplier drawingSupplier = new DefaultDrawingSupplier(); plot.setOrientation(PlotOrientation.VERTICAL);
/** * 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); } }
/** * 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); } }
/** * 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); } }
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; }
@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)); }
public static XYPlot createResponseTimesPlot(String domainAxisName) { XYPlot plot = createPlot(createNumberAxis(domainAxisName), createPercentileAxis("Percentiles (%)"), createNumberAxis("Count")); plot.setOrientation(PlotOrientation.HORIZONTAL); return plot; }
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); } }
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); }