Skip to content

Series don't plot in nbagg while dataframe.plot() call works #9919

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
michaelaye opened this issue Apr 16, 2015 · 5 comments
Closed

Series don't plot in nbagg while dataframe.plot() call works #9919

michaelaye opened this issue Apr 16, 2015 · 5 comments

Comments

@michaelaye
Copy link
Contributor

All explained here:
http://nbviewer.ipython.org/gist/michaelaye/4af80037146dfb65b105

Not sure if I should have submitted it here or with matplotlib. Just let me know, then I can open one there.

Output of pd.show_versions():

INSTALLED VERSIONS

commit: None
python: 3.4.3.final.0
python-bits: 64
OS: Linux
OS-release: 2.6.32-431.11.2.el6.x86_64
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8

pandas: 0.16.0-151-gcef3c85
nose: 1.3.6
Cython: 0.22
numpy: 1.9.2
scipy: 0.15.1
statsmodels: 0.6.1
IPython: 3.2.0-dev
sphinx: 1.2.3
patsy: 0.3.0
dateutil: 2.4.2
pytz: 2015.2
bottleneck: None
tables: 3.1.1
numexpr: 2.3.1
matplotlib: 1.4.3
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: 0.9.9
pymysql: None
psycopg2: None

@jorisvandenbossche
Copy link
Member

I am not fully sure (should look into more detail), but possibly related to the same issue that I reported here: matplotlib/matplotlib#4281
Also, know that Series.plot() does not create a new figure but gets added to the 'current figure', if this exists. WIth nbagg, this means the previous figure that is shown inline in the notebook that gets updated.

@michaelaye
Copy link
Contributor Author

That's good to know, thanks, but why is that so? I would certainly like to be able to control that? (without doing cumbersome fig, ax = plt.subplots()... Is there a keyword to force Series.plot() to create a new plot?
So this means that Series.plot() somehow cannot trigger nbagg to open a new plot window.

@jorisvandenbossche
Copy link
Member

See #8776 for some discussion on this.

You can also always add plt.figure() before the Series.plot() call, if you don't want to go the fig, ax = plt.subplots() route.
Also note that this is the same behaviour as with plt.plot()

@michaelaye
Copy link
Contributor Author

Oh, wow, I even did not see that plt.plot() also cannot open a new plot with nbagg, I am using pandas plotting so often for everything. ;) Thanks for the link.

@jorisvandenbossche
Copy link
Member

Do you think there is still an issue, apart from the things I pointed out? Otherwise you can close the issue.

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