Personally, I think it makes sense to have a Figure.delcolorbar(). Doesn't
Colorbar already have a remove method? I see this merely as a convenience
function.


On Wed, Jun 4, 2014 at 10:48 AM, Kevin Keating <notifications@github.com>
wrote:

> In lib/matplotlib/figure.py:
>
> > @@ -1502,6 +1502,29 @@ def colorbar(self, mappable, cax=None, ax=None, use_gridspec=True, **kw):
> >          self.sca(current_ax)
> >          return cb
> >
> > +    def delcolorbar(self, cb):
>
> My thought was to parallel Figure.delaxes, but adding a Colorbar.remove
> would work as well. Alternatively, I could keep Figure.delcolorbar but
> move most of the code to a new Colorbar,remove_gridspec`` function. That
> way, the only implementation present in the Figure class would be the
> delaxescall and theremove_gridspec``` call.
>
> @pelson <https://github.com/pelson> and @tacaswell
> <https://github.com/tacaswell>, am I right in assuming that you'd both
> prefer a Colorbar.remove function? If so, I'll change to that.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/matplotlib/matplotlib/pull/3110/files#r13389808>.
>