# Buggy code
def _adorn_subplots(self):
    """Common post process unrelated to data"""
    if len(self.axes) > 0:
        all_axes = self._get_axes()
        nrows, ncols = self._get_axes_layout()
        _handle_shared_axes(
            axarr=all_axes,
            nplots=len(all_axes),
            naxes=nrows * ncols,
            nrows=nrows,
            ncols=ncols,
            sharex=self.sharex,
            sharey=self.sharey,
        )

    for ax in self.axes:
        if self.yticks is not None:
            ax.set_yticks(self.yticks)

        if self.xticks is not None:
            ax.set_xticks(self.xticks)

        if self.ylim is not None:
            ax.set_ylim(self.ylim)

        if self.xlim is not None:
            ax.set_xlim(self.xlim)

        ax.grid(self.grid)

    if self.title:
        if self.subplots:
            self.fig.suptitle(self.title)
        else:
            self.axes[0].set_title(self.title)


# Traceback (AttributeError)
fig, ax = plt.subplots()
fig.add_axes([0.2, 0.2, 0.2, 0.2])
pd.Series(np.random.rand(100)).plot(ax=ax)
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-13-80531efe48c4> in <module>()
8 fig, ax = plt.subplots()
9 inset = fig.add_axes([0.2, 0.2, 0.2, 0.2])
---> 10 data.plot(ax=ax)

/Users/jakevdp/anaconda/envs/python3.4/lib/python3.4/site-packages/pandas/tools/plotting.py in __call__(self, kind, ax, figsize, use_index, title, grid, legend, style, logx, logy, loglog, xticks, yticks, xlim, ylim, rot, fontsize, colormap, table, yerr, xerr, label, secondary_y, **kwds)
3491                            colormap=colormap, table=table, yerr=yerr,
3492                            xerr=xerr, label=label, secondary_y=secondary_y,
-> 3493                            **kwds)
3494     __call__.__doc__ = plot_series.__doc__
3495

/Users/jakevdp/anaconda/envs/python3.4/lib/python3.4/site-packages/pandas/tools/plotting.py in plot_series(data, kind, ax, figsize, use_index, title, grid, legend, style, logx, logy, loglog, xticks, yticks, xlim, ylim, rot, fontsize, colormap, table, yerr, xerr, label, secondary_y, **kwds)
2581                  yerr=yerr, xerr=xerr,
2582                  label=label, secondary_y=secondary_y,
-> 2583                  **kwds)
2584
2585

/Users/jakevdp/anaconda/envs/python3.4/lib/python3.4/site-packages/pandas/tools/plotting.py in _plot(data, x, y, subplots, ax, kind, **kwds)
2378         plot_obj = klass(data, subplots=subplots, ax=ax, kind=kind, **kwds)
2379
-> 2380     plot_obj.generate()
2381     plot_obj.draw()
2382     return plot_obj.result

/Users/jakevdp/anaconda/envs/python3.4/lib/python3.4/site-packages/pandas/tools/plotting.py in generate(self)
990             self._post_plot_logic_common(ax, self.data)
991             self._post_plot_logic(ax, self.data)
--> 992         self._adorn_subplots()
993
994     def _args_adjust(self):

/Users/jakevdp/anaconda/envs/python3.4/lib/python3.4/site-packages/pandas/tools/plotting.py in _adorn_subplots(self)
1141                                 naxes=nrows * ncols, nrows=nrows,
1142                                 ncols=ncols, sharex=self.sharex,
-> 1143                                 sharey=self.sharey)
1144
1145         for ax in self.axes:

/Users/jakevdp/anaconda/envs/python3.4/lib/python3.4/site-packages/pandas/tools/plotting.py in _handle_shared_axes(axarr, nplots, naxes, nrows, ncols, sharex, sharey)
3378                 layout = np.zeros((nrows+1,ncols+1), dtype=np.bool)
3379                 for ax in axarr:
-> 3380                     layout[ax.rowNum, ax.colNum] = ax.get_visible()
3381
3382                 for ax in axarr:

AttributeError: 'Axes' object has no attribute 'rowNum'

# Fixed code
def _adorn_subplots(self):
    """Common post process unrelated to data"""
    if len(self.axes) > 0:
        all_axes = self._get_subplots()
        nrows, ncols = self._get_axes_layout()
        _handle_shared_axes(
            axarr=all_axes,
            nplots=len(all_axes),
            naxes=nrows * ncols,
            nrows=nrows,
            ncols=ncols,
            sharex=self.sharex,
            sharey=self.sharey,
        )

    for ax in self.axes:
        if self.yticks is not None:
            ax.set_yticks(self.yticks)

        if self.xticks is not None:
            ax.set_xticks(self.xticks)

        if self.ylim is not None:
            ax.set_ylim(self.ylim)

        if self.xlim is not None:
            ax.set_xlim(self.xlim)

        ax.grid(self.grid)

    if self.title:
        if self.subplots:
            self.fig.suptitle(self.title)
        else:
            self.axes[0].set_title(self.title)