Exception for the colorbar of a imshow of zeroes

Hi,

Using the SVN version the following example fails with:

File "/usr/local/lib/python2.6/dist-packages/matplotlib/colors.py", line 815, in inverse
     raise ValueError("Inversion requires valid vmax > vmin")
ValueError: Inversion requires valid vmax > vmin

This was introduced in svn revision 8308.

Example script: ---------------------------------------

import numpy as np
import matplotlib.pyplot as plt

plt.imshow(np.zeros((10,10)))
plt.colorbar()
plt.show()

···

------------------------------------------------

Regards,
Jo�o Silva

Hi,

Using the SVN version the following example fails with:

File "/usr/local/lib/python2.6/dist-packages/matplotlib/colors.py", line
815, in inverse
      raise ValueError("Inversion requires valid vmax> vmin")
ValueError: Inversion requires valid vmax> vmin

This was introduced in svn revision 8308.

Example script: ---------------------------------------

import numpy as np
import matplotlib.pyplot as plt

plt.imshow(np.zeros((10,10)))
plt.colorbar()
plt.show()

------------------------------------------------

Regards,
João Silva

Thank you. It's fixed in 8331.

Eric

···

On 05/21/2010 03:55 AM, João Luís Silva wrote:

------------------------------------------------------------------------------

_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
matplotlib-devel List Signup and Options