1 | for (int i = 0; i < n; i++) {↵ | | 1 | for (int i = 0; i < n; i++) {↵
|
2 | CategoryPlot plot = (CategoryPlot) this.subplots.get(i);↵ | | 2 | XYPlot plot = (XYPlot) this.subplots.get(i);↵
|
|
3 | // calculate sub-plot area↵ | | 3 | // calculate sub-plot area↵
|
4 | if (orientation == PlotOrientation.HORIZONTAL) {↵ | | 4 | if (orientation == PlotOrientation.HORIZONTAL) {↵
|
5 | double w = usableSize * plot.getWeight() / this.totalWeight;↵ | | 5 | double w = usableSize * plot.getWeight() / this.totalWeight;↵
|
6 | this.subplotAreas[i] = new Rectangle2D.Double(x, y, w,↵ | | 6 | this.subplotAreas[i] = new Rectangle2D.Double(x, y, w,↵
|
7 | adjustedPlotArea.getHeight());↵ | | 7 | adjustedPlotArea.getHeight());↵
|
8 | x = x + w + this.gap;↵ | | 8 | x = x + w + this.gap;↵
|
9 | }↵ | | 9 | }↵
|
10 | else if (orientation == PlotOrientation.VERTICAL) {↵ | | 10 | else if (orientation == PlotOrientation.VERTICAL) {↵
|
11 | double h = usableSize * plot.getWeight() / this.totalWeight;↵ | | 11 | double h = usableSize * plot.getWeight() / this.totalWeight;↵
|
12 | this.subplotAreas[i] = new Rectangle2D.Double(x, y,↵ | | 12 | this.subplotAreas[i] = new Rectangle2D.Double(x, y,↵
|
13 | adjustedPlotArea.getWidth(), h);↵ | | 13 | adjustedPlotArea.getWidth(), h);↵
|
14 | y = y + h + this.gap;↵ | | 14 | y = y + h + this.gap;↵
|
15 | }↵ | | 15 | }↵
|
|
16 | AxisSpace subSpace = plot.calculateRangeAxisSpace(g2,↵ | | 16 | AxisSpace subSpace = plot.calculateRangeAxisSpace(g2,↵
|
17 | this.subplotAreas[i], null);↵ | | 17 | this.subplotAreas[i], null);↵
|
18 | space.ensureAtLeast(subSpace);↵ | | 18 | space.ensureAtLeast(subSpace);↵
|
|
19 | } | | 19 | }
|