Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

%matplotlib inline interaction? #13

Closed
nicolaskruchten opened this issue Mar 21, 2019 · 3 comments
Closed

%matplotlib inline interaction? #13

nicolaskruchten opened this issue Mar 21, 2019 · 3 comments

Comments

@nicolaskruchten
Copy link
Contributor

I did notice one thing: if I put %matplotlib inline to also use mpl plots (cause legacy stuff) then the px stops rendering - it makes a blank space in the notebook of about the size the figure would be.

From https://www.reddit.com/r/Python/comments/b3doya/introducing_plotly_express/ej0p664/

@khalido
Copy link

khalido commented Mar 21, 2019

Hi, I made that reddit post linked to above, just clarifying that it doesn't seem to have anything to do with using `%matplotlib inline%, I've getting that behaviour in new, blank notebooks as well.

So its probable the same as issue 17.

I'm using Anaconda 2018.12, installed plotly_express using pip install plotly_express.

I'm testing this out in a new conda env with just pip installed and then doing pip install plotly_express.

it imports fine:

import plotly_express as px
print(px.data.iris.__doc__)
iris = px.data.iris()```

prints out info and I get a iris data frame, but doing this:

px.scatter(iris, x="sepal_width", y="sepal_length") or

fig = px.scatter(iris, x="sepal_width", y="sepal_length")
fig

gives me a blank area the size of the plot.

It seems to be in offline mode as fig.offline_initialized returns True.

After trying above, I installed all the jupyterlab widgets as listed here:
https://github.com/plotly/plotly.py#jupyterlab-support-python-35

but that didn't do anything either.

@nicolaskruchten
Copy link
Contributor Author

OK, we'll take a look! which versions of Python and JupyterLab are you using?

@nicolaskruchten
Copy link
Contributor Author

I've updated the README to note that the plotly-extension needs to be installed if using JupyterLab via jupyter labextension install @jupyterlab/plotly-extension ... This resolved #17 apparently.

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

No branches or pull requests

2 participants