Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jupyter notebook jumps after evaluation of cell

In my Jupyter notebook, every time I evaluate a cell at the bottom of the page, the notebook jumps up so that it hides part of the output.

Here is an example with pictures. In this picture I want to evaluate the last cell. https://imgur.com/qzAB8Nw

After evaluation, the screen jumps up so I can't see the last part of the output. https://imgur.com/GPQjRBt

So every time I have to scroll up manually to get back the view. Is there a setting here I can tweak to eliminate this issue?

Here's information from the "about" page of Jupyter:

The version of the notebook server is 3.2.1-2d95975 and is running on: Python 2.7.5 |Anaconda 1.6.2 (32-bit)| (default, Jul 1 2013, 12:41:55) [MSC v.1500 32 bit (Intel)]

Current Kernel Information:

Python 2.7.5 |Anaconda 1.6.2 (32-bit)| (default, Jul 1 2013, 12:41:55) [MSC v.1500 32 bit (Intel)] Type "copyright", "credits" or "license" for more information.

IPython 3.2.1

like image 838
SorcererofDM Avatar asked Aug 03 '15 07:08

SorcererofDM


People also ask

What does %% capture do in Jupyter?

What does %% capture do in Jupyter? Capturing Output With %%capture IPython has a cell magic, %%capture , which captures the stdout/stderr of a cell. With this magic you can discard these streams or store them in a variable. By default, %%capture discards these streams.

How do I stop cell execution Jupyter?

After you run a cell, the output of the cell's code will appear in the space below. To stop running a piece of code, press the stop button.

Do Jupyter notebook cells run sequentially?

It runs in sequence. You will actually see the progress as the cells that are in queue will show a star In [*]: , while the cells that have successfully will show some number, ex.: In [123] .


1 Answers

You may add few cells below your last code cell to avoid this issue.!!!

When you press ctrl+enter to run the last cell (infact any cell), the DOM of notebook removes the existing output. So the browser clears some content below it and scrolls up. But python output is displayed only after few microseconds, so the output is only partly visible. Unaware of any other method to overcome this issue.

like image 199
AtomicScience Avatar answered Sep 17 '22 18:09

AtomicScience