Skip to content

VIS: DataFrame.plot(kind='kde') does not display the legend. #4216

Closed
@garaud

Description

@garaud

Hi,

I would like to have the legend when I display the 'kde' (also called 'dentity') of a DataFrame. The plot method works well with the other kind options (i.e. bar, barh and line).

Following piece of code:

import numpy as np
import pandas as pd
df = pd.DataFrame({'X': np.random.randn(500),
                   'Y': 2. + np.random.randn(500)*0.75})
# then
df.plot(kind='kde')

does not display the legend for X and Y (even if I set legend=True which is the default value of the legend parameter). Note: I'm on master > 0.12rc1

Best regards,
Damien

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions