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; }
private JFreeChart createChart(final String title, final String categoryAxisLabel, final String valueAxisLabel, final XYSeriesCollection dataset) { JFreeChart c = ChartFactory.createXYLineChart(title, categoryAxisLabel, valueAxisLabel, dataset, PlotOrientation.VERTICAL, true, // legend? false, // tooltips? false // URLs? ); if (this.isLogarithmicAxis){ XYPlot p = (XYPlot) c.getPlot(); LogarithmicAxis axis_x = new LogarithmicAxis(this.xAxisLabel); LogarithmicAxis axis_y = new LogarithmicAxis(this.yAxisLabel); axis_x.setAllowNegativesFlag(false); axis_y.setAllowNegativesFlag(false); p.setDomainAxis(axis_x); p.setRangeAxis(axis_y); } return c; }
private JFreeChart createChart(final String title, final String categoryAxisLabel, final String valueAxisLabel, final XYSeriesCollection dataset) { JFreeChart c = ChartFactory.createScatterPlot(title, categoryAxisLabel, valueAxisLabel, dataset, PlotOrientation.VERTICAL, true, // legend? false, // tooltips? false // URLs? ); if (this.isLogarithmicAxis) { XYPlot p = (XYPlot) c.getPlot(); LogarithmicAxis axis_x = new LogarithmicAxis(this.xAxisLabel); LogarithmicAxis axis_y = new LogarithmicAxis(this.yAxisLabel); axis_x.setAllowNegativesFlag(false); axis_y.setAllowNegativesFlag(false); p.setDomainAxis(axis_x); p.setRangeAxis(axis_y); } return c; }
if (_testSuite.getParam(Constants.RESULT_AXIS_X).equalsIgnoreCase("logarithmic")) { LogarithmicAxis logAxisX = new LogarithmicAxis(resultUnitX); logAxisX.setAllowNegativesFlag(true); plot.setDomainAxis(logAxisX); logAxis.setAllowNegativesFlag(true); plot.setRangeAxis(logAxis);
if (_testSuite.getParam(Constants.RESULT_AXIS_X).equalsIgnoreCase("logarithmic")) { LogarithmicAxis logAxisX = new LogarithmicAxis(resultUnitX); logAxisX.setAllowNegativesFlag(true); plot.setDomainAxis(logAxisX); logAxis.setAllowNegativesFlag(true); plot.setRangeAxis(logAxis);
final LogarithmicAxis axis_x = new LogarithmicAxis("Count Volumes [veh/24h]"); final LogarithmicAxis axis_y = new LogarithmicAxis("Sim Volumes [veh/24h]"); axis_x.setAllowNegativesFlag(false); axis_y.setAllowNegativesFlag(false);
final LogarithmicAxis axis_x = new LogarithmicAxis("Count Volumes [veh/h]"); final LogarithmicAxis axis_y = new LogarithmicAxis("Sim Volumes [veh/h]"); axis_x.setAllowNegativesFlag(false); axis_y.setAllowNegativesFlag(false);
final LogarithmicAxis axis_y = new LogarithmicAxis( "Sim Volumes [veh/h]"); axis_x.setAllowNegativesFlag(false); axis_y.setAllowNegativesFlag(false);