Skip to content

DataFrame.plot error when both 'color' and 'style' arguments are passed #9671

Closed
@davidbrochart

Description

@davidbrochart

In pandas 0.15.2, when passing both arguments 'color' and 'style' to the plot method, there is an error which I think should be raised only when there is a color symbol in the style string. But in the example below, the error is raised even though there is no color symbol in the line string:

from pandas import DataFrame
import numpy as np
df = DataFrame({'a': np.random.rand(10), 'b': np.random.rand(10), 'c': np.random.rand(10)})
df.plot(color = ['red', 'black', 'blue'], style = ['-', '--', '-'])

The error is not clear (TypeError: expected string or buffer). This should be fixed, although it is easy to work around:

df.plot(style = ['r-', 'k--', 'b-'])

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions