matplotlib/matplotlib — pull request #1229 by ajdawson (2012-09-10 19:05:40+00:00)
Title: NF - option to make colorbar extensions rectangles

I made a small change to allow the minimum and maximum colorbar extensions to be rectangular instead of triangular. This makes most sense when used in combination with the recently added extendfrac keyword with ``extendfrac='auto'``.

A use case for this (one I recently encountered) is the need to make plots from matplotlib visually consistent with plots produced in other systems. For example, the NCAR Command Language (NCL) cannot produce triangular colorbar extensions at all (see http://www.ncl.ucar.edu/Applications/labelbar.shtml).

I appreciate that the same result could probably be achieved through fiddling with the colorbar values and labels, but this feels like the most intuitive solution for users.