Skip to content

DataFrame.plot() fails to pass figsize= and title= when plotting one column against another #2342

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

Closed
bluefir opened this issue Nov 24, 2012 · 1 comment
Milestone

Comments

@bluefir
Copy link

bluefir commented Nov 24, 2012

I have Python 2.7.3 and IPython 0.13.1. Do this in IPython Notebook:

%pylab inline
import numpy as np
from pandas import Index, DataFrame
test = DataFrame(np.random.randn(10, 2), index=Index(range(10), name='bins'), columns=['x', 'y'])

The following works perfectly fine:

test.plot(figsize=(16, 8), title='Test')

But the following doesn't - figsize and title to not take effect:

test.plot(x='x', y='y', figsize=(16, 8), title='Test')

The output is the same as for

test.plot(x='x', y='y')

Here is another strange behavior I observe. The following works fine and fixes the above issue:

plt.figure(figsize=(16, 8))
test.plot(x='x', y='y')
plt.title('Test')

But the following doesn't work - figsize does not take effect even though title does:

plt.figure(figsize=(16, 8))
test.plot()
plt.title('Test')

This is very confusing. Are these pandas issues or do I have some problems in my local configuration?

@changhiskhan
Copy link
Contributor

closed via 9796924

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants