Skip to content

BUG/CLN: LinePlot uses incorrect xlim when secondary_y=True #7459

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 7, 2014

Conversation

sinhrks
Copy link
Member

@sinhrks sinhrks commented Jun 14, 2014

xlim is not set properly when secondary_y=True. This is different issue from #7322.

Also, refactored secondary_y to be handled only by MPLPlot, because it will be required in future fix to pass multiple axes to df.plot, like #7069 (I'm willing to work soon..).

df = pd.DataFrame(np.random.randn(5, 5), columns=['A', 'B', 'C', 'D', 'E'])
df.plot(secondary_y=True)

figure_1

df = pd.DataFrame(np.random.randn(5, 5), columns=['A', 'B', 'C', 'D', 'E'])
df.plot(secondary_y=['A', 'B'], subplots=True)

figure_2

@jreback jreback added this to the 0.14.1 milestone Jun 14, 2014
@jreback
Copy link
Contributor

jreback commented Jun 14, 2014

@cpcloud

@jreback
Copy link
Contributor

jreback commented Jun 17, 2014

@cpcloud ?

@jreback
Copy link
Contributor

jreback commented Jul 2, 2014

@sinhrks ?

@sinhrks
Copy link
Member Author

sinhrks commented Jul 5, 2014

@jreback Updated and rebased based on #7322 and #7515.
cc @rosnfeld

@@ -2932,12 +2908,6 @@ def _subplots(nrows=1, ncols=1, naxes=None, sharex=False, sharey=False, squeeze=

ax : Matplotlib axis object, optional

secondary_y : boolean or sequence of ints, default False
If True then y-axis will be on the right

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what did these kw's do?

@jreback
Copy link
Contributor

jreback commented Jul 7, 2014

@TomAugspurger

cc @rosnfeld ok with this?

@rosnfeld
Copy link
Contributor

rosnfeld commented Jul 7, 2014

Not sure how deep a review I can do as I am just about to head out abroad again (more or less offline until August), but this does seem to behave properly in various ad-hoc tests, and seems to clean up a few things that surprised me when I first started looking at plotting code. A somewhat larger/more dramatic change than I would have expected, but glad to see that larger changes are possible/being done to the somewhat thorny (IMO) plotting code.

jreback added a commit that referenced this pull request Jul 7, 2014
BUG/CLN: LinePlot uses incorrect xlim when secondary_y=True
@jreback jreback merged commit 87436a3 into pandas-dev:master Jul 7, 2014
@jreback
Copy link
Contributor

jreback commented Jul 7, 2014

@sinhrks thanks! @rosnfeld thanks for the commentary

if you guys find addtl issues, pls report!

@sinhrks sinhrks deleted the secondary_y branch July 9, 2014 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants