Bug in colorbar labeling

Hi,

I have been using the colorbar() method along with pcolor to make image
plots of data. Normally, the colorbar legend is correct. However, when
the range of numbers to plot is less than 1, such as 10^-3 - 2*10^-3, the
colorbar labels just show up as 0.0 on the top and bottom.

Thanks,
Curtis

Hi all,

I have a fix for the problem mentioned. In the latest release, subdir
matploblib-0.60.2/matplotlib/matlab.py line 542 there is a bug. It should
read:

cax.set_yticklabels([tickfmt%tick for tick in cticks])

instead of

cax.set_yticklabels(['%1.1f'%tick for tick in cticks])

so as to take advantage of the optional input parameter tickfmt (format
specifier) for the colorbar labels. With this change, the colorbar labels
come out fine and adjust properly according to the input format specifier.

Thanks,
Curtis

I reported this bug July 19 for an earlier version of Matplotlib, but it
is still relevent through Matplotlib v. 0.62-4:

I have been using the colorbar() method along with pcolor to make image
plots of data. Normally, the colorbar legend is correct. However, when
the range of numbers to plot is less than 1, such as 10^-3 - 2*10^-3, the
colorbar labels just show up as 0.0 on the top and bottom.

The key will be to get the tickfmt option into the colorbar() function
working properly.

Cheers,
Curtis