resize ipython notebook output window
Ipython NotebookJupyter NotebookIpython Notebook Problem Overview
By default the ipython notebook ouput is limited to a small sub window at the bottom. This makes us force to use separate scroll bar that comes with the output window, when the output is big.
Any configuration option to make it not limited in size, instead run as high as the actual output is? Or option to resize it once it gets created?
Ipython Notebook Solutions
Solution 1 - Ipython Notebook
You can toggle the scroll window in the main menu of the notebook
Cell -> Current Outputs -> Toggle Scrolling
Solution 2 - Ipython Notebook
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;
Solution 3 - Ipython Notebook
I just placed my cursor in the grey box next to the output and clicked and then all of the output was displayed.
Solution 4 - Ipython Notebook
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>"))
Solution 5 - Ipython Notebook
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.
Solution 6 - Ipython Notebook
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.
Solution 7 - Ipython Notebook
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>
Solution 8 - Ipython Notebook
This is what works for me:
%%html
<style>
.output_wrapper .output {
overflow-y: visible;
height: fit-content;
}
</style>
It may depend on the version of Jupyter.
Solution 9 - Ipython Notebook
I tried all the options above and none of them worked. This is how I got rid of the scrolling cell. Right-click on the cell, and click "disable scrolling for outputs" I know this doesn't resize the scrolling cell, but it does make my code more legible since the scrolling cells are very small(for me at least).
Solution 10 - Ipython Notebook
In JupyterLab you can right click and choose: Create New View for Output.