Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

resize ipython notebook output window

People also ask

How do you increase the size of a Jupyter Notebook?

If you want to change the text cell font and font size you can type the following in a cell and hit shift+enter.

How do I minimize my output Jupyter Notebook?

There are two ways to hide content: To hide Markdown, use the {toggle} directive. To hide or remove code cells or their outputs, use notebook cell tags.

How do I make Jupyter full screen?

Click F11, to view the Jupyter Notebook in Full Screen Mode. Click F11 once more, to come out of Full Screen Mode.


You can toggle the scroll window in the main menu of the notebook

Cell -> Current Outputs -> Toggle Scrolling


Addendum #2: This comment: https://github.com/ipython/ipython/issues/2172#issuecomment-53708976 indicates how you can increase the maximum size of the output cells. Run the following code in the notebook:

%%javascript
IPython.OutputArea.auto_scroll_threshold = 9999;

I just placed my cursor in the grey box next to the output and clicked and then all of the output was displayed.


To resize the height of the scrollable output I do the following (you can change 44em):

from IPython.core.display import display, HTML
display(HTML("<style>div.output_scroll { height: 44em; }</style>"))

This worked for me in Chrome. Run it in a separate cell. Choose the max-height you want to display without scrolling.

%%html
<style>
.output_wrapper, .output {
    height:auto !important;
    max-height:1000px;  /* your desired max-height here */
}
.output_scroll {
    box-shadow:none !important;
    webkit-box-shadow:none !important;
}
</style>

You'll still get scroll bars if the contents exceed the max-height. There won't be a shadow box, though. Just increase the max-height even more if really don't want scrolling at all.


See the jupyter autoscroll extension (part of jupyter_contrib_nbextensions), which allows you to select when the output starts scrolling in a dropdown menu (you can set it to never scroll). The API used is not officially supported though, so this may break at any time.


For an plot.ly iplot I had to add the following to see any change (it changed all output)

%%html
<style>
.python-iframe > iframe {
  height:1000px !important;
}
</style>