Skip to content

single column DF plot, color problem #3486

Closed
@httassadar

Description

@httassadar
import pylab
import pandas.util.testing as put
df = put.makeTimeDataFrame()
pylab.figure()
df[ ['A'] ].plot(color = ['r'])
pylab.savefig('C:/tmp.png')

will give an error

raise ValueError('to_rgba: Invalid rgba arg "%s"\n%s' % (str(arg), exc))
ValueError: to_rgba: Invalid rgba arg "['r']"

All you need to do is to de-list the color parameter

df[ ['A'] ].plot(color = 'r')    

No problem if df is more than one columns.

df.plot(color = ['r','k'])

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions