notebook
notebook copied to clipboard
Is there a way to allow an output cell to scroll by its self?
If I were to do
for i in 1000:
print i
output cell would scroll downwards by itself.
@ArEnSc If you ran this code in Python 3 with a Jupyter notebook, you would be able to scroll through the output:
I would like it to scroll by it self to the latest printed value is that possible ?
I don't think we have an option to do that. You can probably do it with a notebook extension, but I don't know quite what JS you'd need.
@ArEnSc : We're doing a little housekeeping on our issue log and noticed this thread from 2016. Were you able to find a solution to your issue? Please let us know! We'll close this issue if you found what you need. thanks!
I'd like to add a vote for this issue, with one clarification: it should only scroll if the output is already scrolled down to the bottom.
I often run calculations the produce output over some extended time, maybe printing another line every ten seconds or so. I want to sit and watch the output as it appears. But once it collapses all the output into a scrollable text area, it stops being visible. I can scroll the output down to the bottom, but when the next line appears, it's always hidden off the bottom. So I have to sit there with the mouse hovering over it, ready to scroll it down by hand every ten seconds just so I can see the next line that's just appeared. This gets really irritating!
Of course, I might also want to scroll back through the output and look over it while the code is still running. If it kept jumping back to the bottom, that would also be irritating. So this is the behavior I suggest. If the cell's output is already scrolled to the bottom and new output appears, it should automatically scroll to make that new output visible. If it's scrolled to anywhere other than the bottom, it should remain where it is when new output appears.
And to be clear, I'm talking about scrolling the output of a particular cell. I'm not talking about scrolling the whole window.
Was there ever a solution to this issue?
I agree it would be very useful to lock the output scroll bar to the bottom (most recent output) in order to monitor output as it happens without having to manually scroll to the bottom.
Yeah, I'm looking for a solution to this as well.
I would also really appreciate such a feature. The collapsed output cell should stay at the point where I leave the scrollbar. Unless I scroll to the very bottom, then it should be implicitely assumed that I want it to follow the output (behaving like the -f option in tail, for example)
You can use the scroll_down extenstion from jupyter_contrib_nbextensions to get automatic output cell scroll mechanism.

It might be really nice if you could make cell scrolling persistent. Cell scrolling seems to reset to False whenever you restart the kernel.
Based on the code here:
https://github.com/ipython-contrib/jupyter_contrib_nbextensions/blob/master/src/jupyter_contrib_nbextensions/nbextensions/scroll_down/config.yaml
It looks like you can just change the default flag to true from false?
surprised there isn't more support for this! would love this feature
I would really like this feature too! Constantly having to scroll down when printing the progress of an algorithm gets tedious quickly
bump for this feature to be the default! the scroll_down extension repo has 4.3K stars
+1 for such feature
I often use Jupyter for machine learning experiments and a build-in auto-scrolling feature would be very useful in cases where only text output is available or it is preferred for whatever reason (e.g., TensorFlow's progress bars). I can get more space by opening a new output panel but it eventually has the same issue.
whoa, I last talked about this 5 years ago, I am glad an extension was made!
Yep haha, sorry to anyone who I notified by accident ... though there is an extension I think it would make sense if there was an option for this included in Jupyter, even just as a line in the config/settings file.
I would also enjoy such a feature. Hope there's been progress...
Unfortunately that extension doesn't work with Jupyter Lab
Adding to the Future milestone for consideration, as this could be implemented in Notebook 7 next if someone is up for it.
Code wise this could be placed in the same file as the auto-scroll plugin:
https://github.com/jupyter/notebook/blob/73646334817ffaf3dd6adde7a746a2cc2ff1f9cf/packages/notebook-extension/src/index.ts#L248
bump for this feature to be the default! the scroll_down extension repo has 4.3K stars
An alternative would be to port this extension to JupyterLab, which would then work in Notebook 7 as well.