mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
issue #60 - scale plotter accoring to solution
This commit is contained in:
parent
8ca6966d95
commit
4c2651087b
1 changed files with 6 additions and 6 deletions
|
|
@ -268,13 +268,13 @@ public class Plotter {
|
||||||
return plot;
|
return plot;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Range getRange(final XYSeriesCollection problem) {
|
private Range getRange(final XYSeriesCollection seriesCol) {
|
||||||
if(this.boundingBox==null) return problem.getRangeBounds(false);
|
if(this.boundingBox==null) return seriesCol.getRangeBounds(false);
|
||||||
else return new Range(boundingBox.minY, boundingBox.maxY);
|
else return new Range(boundingBox.minY, boundingBox.maxY);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Range getDomainRange(final XYSeriesCollection problem) {
|
private Range getDomainRange(final XYSeriesCollection seriesCol) {
|
||||||
if(this.boundingBox == null) return problem.getDomainBounds(true);
|
if(this.boundingBox == null) return seriesCol.getDomainBounds(true);
|
||||||
else return new Range(boundingBox.minX, boundingBox.maxX);
|
else return new Range(boundingBox.minX, boundingBox.maxX);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -297,10 +297,10 @@ public class Plotter {
|
||||||
problemRenderer.setBaseItemLabelPaint(Color.BLACK);
|
problemRenderer.setBaseItemLabelPaint(Color.BLACK);
|
||||||
|
|
||||||
NumberAxis xAxis = new NumberAxis();
|
NumberAxis xAxis = new NumberAxis();
|
||||||
xAxis.setRangeWithMargins(getDomainRange(problem));
|
xAxis.setRangeWithMargins(getDomainRange(solutionColl));
|
||||||
|
|
||||||
NumberAxis yAxis = new NumberAxis();
|
NumberAxis yAxis = new NumberAxis();
|
||||||
yAxis.setRangeWithMargins(getRange(problem));
|
yAxis.setRangeWithMargins(getRange(solutionColl));
|
||||||
|
|
||||||
plot.setDataset(0, problem);
|
plot.setDataset(0, problem);
|
||||||
plot.setRenderer(0, problemRenderer);
|
plot.setRenderer(0, problemRenderer);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue