11

How do I enable vertical scrolling in a code block in a jupyter notebook?

I've done it accidentally before, but now I can't reproduce it. What I found was set autoscroll = true in the file itself using a text editor...

However, I did that... and it already has a setting, "scrolled": true. In the notebook, it has only horizontal scrolling, so I guess that is what the "scrolled" setting modified.

Chris
  • 28,822
  • 27
  • 83
  • 158

4 Answers4

21

In order to enable vertical scrolling in an output cell of the notebook, you just need to click to the left of the cell content (in the margin, you will see the area becomes slighty shaded when you are over it).

If you double click, the content of output cell will be hidden.

If you would like to hide the content of an input cell, see also Scroll windows for code in iPython (Jupyter) Notebooks?.

Community
  • 1
  • 1
Boris Bolliet
  • 236
  • 3
  • 4
18

As suggested by @Mandy, to turn on horizontal scrolling in Jupyter code window just go to Cell>Current/All Outputs>Toggle Scrolling

Turn on horizontal scrolling in Jupyter code window

Gunay Anach
  • 1,193
  • 1
  • 13
  • 19
7

You can try Cell -> Current Outputs -> Toggle Scrolling in the Jupyter UI to enable the scrolling for the output of one cell.

Mandy
  • 71
  • 1
  • 1
-2

Run this code at the end of yours:

from IPython.display import display, HTML
js = "<script>$('.output_scroll').removeClass('output_scroll')</script>"
display(HTML(js))
Malus Jan
  • 1,860
  • 2
  • 22
  • 26