matplotlib/matplotlib — pull request #3110 by KevKeating (2014-06-03 19:51:20+00:00)
Title: BUG: Add Figure.delcolorbar() to fully delete a colorbar

Closes #2688.

This creates a new Figure.delcolorbar() function, named to mimic Figure.delaxes(). The new function will delete a colorbar. If that colorbar was creating with ```use_gridspec=True```, the function will also reset the gridspec. I added two tests to confirm that the function works as intended for colorbars creating with ```use_gridspec``` set to either ```True``` or ```False```.