Skip to content

BUG: hist plot secondary-y doesn't work #9610

@TomAugspurger

Description

@TomAugspurger
Contributor

The labels overlap

In [1]: df = pd.DataFrame(np.random.randn(30, 4), columns=list('abcd'))

In [2]: ax = df.a.plot(legend=True)

In [3]: df.b.plot(ax=ax, legend=True)
Out[3]: <matplotlib.axes._subplots.AxesSubplot at 0x10938f6a0>

hist

Activity

added this to the 0.16.1 milestone on Mar 7, 2015
TomAugspurger

TomAugspurger commented on Mar 7, 2015

@TomAugspurger
ContributorAuthor

Actually not specific to hist.

sinhrks

sinhrks commented on Apr 5, 2015

@sinhrks
Member

After #9812: Because the code above seems to be different, I've used following code:

df = DataFrame(np.random.randn(30, 4), columns=list('abcd'))

# primary -> secondary
ax = df['a'].plot(kind='hist', legend=True)
df['b'].plot(kind='hist', ax=ax, legend=True, secondary_y=True)

9610

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      Participants

      @TomAugspurger@sinhrks

      Issue actions

        BUG: hist plot secondary-y doesn't work · Issue #9610 · pandas-dev/pandas