ResidentMario/missingno

Default color for bar.

Closed this issue · 2 comments

If no color is defined when calling the bar method, it is returned the following TypeError:

lib/python2.7/site-packages/matplotlib/colors.pyc in to_rgba_array(c, alpha)
    235         return result
    236     # Convert one at a time.
--> 237     result = np.empty((len(c), 4), float)
    238     for i, cc in enumerate(c):
    239         result[i] = to_rgba(cc, alpha)

TypeError: object of type 'float' has no len()

The problem is solved if the color attribute is defined when calling the bar method. Wouldn't be the case of assigning a default color when none is specified by the user?

This looks like a bug in the pandas.DataFrame.plot method to me; I can no longer pass RGB tuples to it successfully? IDK what's going on there.

I've fixed this error in HEAD (by using a named color instead), and it will go out as part of a new version of the library fairly soon. Thanks for reporting, and sorry it took so long to get to!