Skip to content
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

compatibility with seaborn and/or Notebook-5.2.0 and/or %matplotlib directive ? #23

Closed
stonebig opened this issue Oct 29, 2017 · 6 comments
Labels

Comments

@stonebig
Copy link
Contributor

stonebig commented Oct 29, 2017

On a Notebook-5.2.0, If I do this:

import ipympl
import matplotlib.pyplot as plt2

plt2.plot([0, 1, 2, 2])
plt2.show()

then next cell, I have to put a %matpollib inline to get my seaborn image, otherwise nothing is displayed:

%matplotlib inline
# Seaborn
# for more examples, see http://stanford.edu/~mwaskom/software/seaborn/examples/index.html
import seaborn as sns
sns.set()
df = sns.load_dataset("iris")
sns.pairplot(df, hue="species", size=1.5)

is it normal ?

@stonebig stonebig changed the title compatiblity with seaborn??? compatibility with seaborn and/orNotebook-5.2.0 ?? Oct 29, 2017
@stonebig stonebig changed the title compatibility with seaborn and/orNotebook-5.2.0 ?? compatibility with seaborn and/or Notebook-5.2.0 ?? Oct 29, 2017
@stonebig
Copy link
Contributor Author

same if I stay on plt instead of plt2:
ipympl

@stonebig
Copy link
Contributor Author

if I do %matplotlib inline in first cell, I get some bad words:
ipympl2

@stonebig stonebig changed the title compatibility with seaborn and/or Notebook-5.2.0 ?? compatibility with seaborn and/or Notebook-5.2.0 and/or %matplotlib directive ? Oct 29, 2017
@stonebig
Copy link
Contributor Author

stonebig commented Oct 29, 2017

ah, on jupyterlab side:

jupyter labextension install matplotlib-jupyter
...
...
...
npm ERR! 404 Registry returned 404 for GET on https://registry.npmjs.org/matplotlib-jupyter
npm ERR! 404
npm ERR! 404  'matplotlib-jupyter' is not in the npm registry.

@SylvainCorlay
Copy link
Member

@stonebig no need for %matplotlib inline. Just an extra call to plt.show() after your seaborn command does the job.

@blink1073
Copy link
Member

I updated the README, it should be jupyter labextension install jupyter-matplotlib.

@SylvainCorlay
Copy link
Member

Closing since both questions were resolved.

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

No branches or pull requests

3 participants