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

Does not show the first cell pylab plot #4137

Open
kangwonlee opened this issue Oct 24, 2018 · 1 comment
Open

Does not show the first cell pylab plot #4137

kangwonlee opened this issue Oct 24, 2018 · 1 comment

Comments

@kangwonlee
Copy link

kangwonlee commented Oct 24, 2018

Hi all

I tried to plot using a revision of my ipython notebook ask follows:

https://github.com/kangwonlee/nmisp-20-interp/commit/d0b4cbb4760edaf9737e33a6ef6c2227a226f168

If you view the file, I tried to import pylab and show() in the first cell. When I select the cell and press Shift+Enter, the plot does not show up at first (as In[1]) but at the second time (as In[2]), it does.

In the following revision, as I splitted the import pylab line as the first cell, the plot in the second cell shows up without much problem:
https://github.com/kangwonlee/nmisp-20-interp/commit/1877621ffb693a612848cf664a2931589632d0a9

My jupyter version is 4.4.0.

$ jupyter --version
4.4.0

Let me know your opinion; is there a step that I missed? or do people usually try it differently?

Thanks for your attention.

KW

@aknrdureegaesr
Copy link

aknrdureegaesr commented Jan 14, 2019

I have what I consider the same issue. From some engineering notebook, I have extracted an excerpt.

I open the notebook in the browser. I restart everything with "Kernel / Restart & clear output". I ask "Cell / Run all". Expected outcome: Graph is plotted. Outcome seen: Graph is not plotted.

I can then manually re-execute the cell. This causes the graph to be plotted.

I can also try to render from the command line with jupyter nbconvert bug.ipynb . Expected outcome: The HTML generated shows the graph. Outcome seen: It doesn't.

Here is my sample notebook that shows this behavior (wrapped in a ZIP archive, as github allows ZIP archives to be attached to issues):

bug.ipynb.zip

Moving the line import pandas as pd from the third cell to the first fixes the problem for me, too.

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