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("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 = 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 = 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; }
NumberAxis yAxis = new NumberAxis("Score calculation speed per second"); yAxis.setNumberFormatOverride(NumberFormat.getInstance(locale)); yAxis.setAutoRangeIncludesZero(false); XYPlot plot = new XYPlot(null, xAxis, yAxis, null); plot.setOrientation(PlotOrientation.VERTICAL);
static NumberAxis createNumberAxis(String label, boolean autoRangeIncludesZero) { final NumberAxis numberAxis = new NumberAxis(label); numberAxis.setAutoRangeIncludesZero(autoRangeIncludesZero); return numberAxis; }
static NumberAxis createNumberAxis(String label, boolean autoRangeIncludesZero) { final NumberAxis numberAxis = new NumberAxis(label); numberAxis.setAutoRangeIncludesZero(autoRangeIncludesZero); return numberAxis; }
final XYItemRenderer renderer2 = new StandardXYItemRenderer(); final NumberAxis rangeAxis2 = new NumberAxis("Forecast Value"); rangeAxis2.setAutoRangeIncludesZero(false); final XYPlot subplot2 = new XYPlot(data2, null, rangeAxis2, renderer2); subplot2.setRangeAxisLocation(AxisLocation.TOP_OR_LEFT);
NumberAxis domain = new NumberAxis("X"); DateAxis range = new DateAxis("Y"); domain.setAutoRangeIncludesZero(false); XYItemRenderer renderer = new XYLineAndShapeRenderer(true, false); XYPlot plot = new XYPlot(dataset, domain, range, renderer); JFreeChart chart = new JFreeChart( "Title", JFreeChart.DEFAULT_TITLE_FONT, plot, false);
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; }
private ValueAxis createAxis(int dataType) { ValueAxis axis; if (ProductData.TYPE_UTC == dataType) { axis = new DateAxis("Date", TimeZone.getTimeZone("UTC"), Locale.ENGLISH); ((DateAxis) axis).setDateFormatOverride(SIMPLE_DATE_FORMAT); } else { axis = new NumberAxis(); ((NumberAxis) axis).setAutoRangeIncludesZero(false); } return axis; }
/** * {@inheritDoc} */ @Override public NumberAxis getAxis() { NumberAxis rangeAxis = new NumberAxis(""); rangeAxis.setAutoRangeIncludesZero(false); rangeAxis.setRangeType(RangeType.POSITIVE); rangeAxis.setAutoRange(true); return rangeAxis; }
/** * {@inheritDoc} */ @Override public NumberAxis getAxis() { NumberAxis rangeAxis = new NumberAxis("Memory (MB)"); rangeAxis.setAutoRangeIncludesZero(false); rangeAxis.setLowerBound(0); rangeAxis.setRangeType(RangeType.POSITIVE); rangeAxis.setAutoRange(true); return rangeAxis; }
static XYPlot newPlot( String verticalLabel, boolean forceIncludeZero, XYDataset dataset ) { StandardXYItemRenderer standardxyitemrenderer = new StandardXYItemRenderer(); NumberAxis numberaxis = new NumberAxis( verticalLabel ); numberaxis.setStandardTickUnits( NumberAxis.createIntegerTickUnits() ); numberaxis.setAutoRangeIncludesZero( forceIncludeZero ); return new XYPlot( dataset, null, numberaxis, standardxyitemrenderer ); }
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); }
private static TimeSeriesCollection addSubPlot(CombinedDomainXYPlot plot, String label) { final TimeSeriesCollection seriesCollection = new TimeSeriesCollection(new TimeSeries(label, Millisecond.class)); NumberAxis rangeAxis = new NumberAxis(); rangeAxis.setAutoRangeIncludesZero(false); XYPlot subplot = new XYPlot(seriesCollection, null, rangeAxis, new StandardXYItemRenderer()); subplot.setBackgroundPaint(Color.lightGray); subplot.setDomainGridlinePaint(Color.white); subplot.setRangeGridlinePaint(Color.white); plot.add(subplot); return seriesCollection; }
private static TimeSeriesCollection addSubPlot(CombinedDomainXYPlot plot, String label) { final TimeSeriesCollection seriesCollection = new TimeSeriesCollection(new TimeSeries(label, Millisecond.class)); NumberAxis rangeAxis = new NumberAxis(); rangeAxis.setAutoRangeIncludesZero(false); XYPlot subplot = new XYPlot(seriesCollection, null, rangeAxis, new StandardXYItemRenderer()); subplot.setBackgroundPaint(Color.lightGray); subplot.setDomainGridlinePaint(Color.white); subplot.setRangeGridlinePaint(Color.white); plot.add(subplot); return seriesCollection; }