afreechart/src/main/java/org/afree/chart/plot/CombinedRangeCategoryPlot.java
/**
     * Draws the plot on a graphics device (such as the screen or a
     * printer).  Will perform all the placement calculations for each
     * sub-plots and then tell these to draw themselves.
     *
     * @param canvas  the graphics device.
     * @param area  the area within which the plot (including axis labels)
     *              should be drawn.
     * @param anchor  the anchor point (<code>null</code> permitted).
     * @param parentState  the parent state.
     * @param info  collects information about the drawing (<code>null</code>
     *              permitted).
     */
Draws the plot on a graphics device (such as the screen or a
printer).  Will perform all the placement calculations for each
sub-plots and then tell these to draw themselves.

@param canvas  the graphics device.
@param area  the area within which the plot (including axis labels)
should be drawn.
@param anchor  the anchor point (null permitted).
@param parentState  the parent state.
@param info  collects information about the drawing (null
permitted).
Draws the plot on a graphics device ( such as the screen or a printer ) . Will perform all the placement calculations for each sub - plots and then tell these to draw themselves . @param canvas the graphics device . @param area the area within which the plot ( including axis labels ) should be drawn . @param anchor the anchor point ( null permitted ) . @param parentState the parent state . @param info collects information about the drawing ( null permitted ) .
public void draw(Canvas canvas, RectShape area, PointF anchor,
                     PlotState parentState,
                     PlotRenderingInfo info) {
        if (info != null) {
            info.setPlotArea(area);
        }
        RectangleInsets insets = getInsets();
        insets.trim(area);
        AxisSpace space = calculateAxisSpace(canvas, area);
        RectShape dataArea = space.shrink(area, null);
        setFixedDomainAxisSpaceForSubplots(space);
        ValueAxis axis = getRangeAxis();
        RectangleEdge rangeEdge = getRangeAxisEdge();
        double cursor = RectangleEdge.coordinate(dataArea, rangeEdge);
        AxisState state = axis.draw(canvas, cursor, area, dataArea, rangeEdge,
                info);
        if (parentState == null) {
            parentState = new PlotState();
        }
        parentState.getSharedAxisStates().put(axis, state);
        for (int i = 0; i < this.subplots.size(); i++) {
            CategoryPlot plot = (CategoryPlot) this.subplots.get(i);
            PlotRenderingInfo subplotInfo = null;
            if (info != null) {
                subplotInfo = new PlotRenderingInfo(info.getOwner());
                info.addSubplotInfo(subplotInfo);
            }
            PointF subAnchor = null;
            if (anchor != null && this.subplotArea[i].contains(anchor)) {
                subAnchor = anchor;
            }
            plot.draw(canvas, this.subplotArea[i], subAnchor, parentState,
                    subplotInfo);
        }
        if (info != null) {
            info.setDataArea(dataArea);
        }
    }
public void draw ( Canvas canvas , RectShape area , PointF anchor , PlotState parentState , PlotRenderingInfo info ) { if ( info != null ) { info . setPlotArea ( area ) ; } RectangleInsets insets = getInsets ( ) ; insets . trim ( area ) ; AxisSpace space = calculateAxisSpace ( canvas , area ) ; RectShape dataArea = space . shrink ( area , null ) ; setFixedDomainAxisSpaceForSubplots ( space ) ; ValueAxis axis = getRangeAxis ( ) ; RectangleEdge rangeEdge = getRangeAxisEdge ( ) ; double cursor = RectangleEdge . coordinate ( dataArea , rangeEdge ) ; AxisState state = axis . draw ( canvas , cursor , area , dataArea , rangeEdge , info ) ; if ( parentState == null ) { parentState = new PlotState ( ) ; } parentState . getSharedAxisStates ( ) . put ( axis , state ) ; for ( int i = 0 ; i < this . subplots . size ( ) ; i ++ ) { CategoryPlot plot = ( CategoryPlot ) this . subplots . get ( i ) ; PlotRenderingInfo subplotInfo = null ; if ( info != null ) { subplotInfo = new PlotRenderingInfo ( info . getOwner ( ) ) ; info . addSubplotInfo ( subplotInfo ) ; } PointF subAnchor = null ; if ( anchor != null && this . subplotArea [ i ] . contains ( anchor ) ) { subAnchor = anchor ; } plot . draw ( canvas , this . subplotArea [ i ] , subAnchor , parentState , subplotInfo ) ; } if ( info != null ) { info . setDataArea ( dataArea ) ; } }
Draws the plot on a graphics device (such as the screen or a
 printer).
Draws the plot on a graphics device ( such as the screen or a printer ) .
// set up info collection... // adjust the drawing area for plot insets (if any)... // calculate the data area... // set the width and height of non-shared axis of all sub-plots // draw the shared axis // draw all the charts