-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal for enhancing display() #2593
Comments
Should this go to https://github.com/ipython/ipython/issues ? |
This is more related to IPython than it is to notebook, certainly. I think that the 'update' mechanism we introduced recently is a more elegant and flexible alternative to adding a The separator gets tricky with multiple mime types - |
What is the update mechanism? I know that a sep would be tricky, but it would be very useful. |
@rgbkrk can probably describe it better, but the idea is that a display call can supply or request a display id, and then later calls to display can replace a previously displayed object by ID. So e.g. a progress bar can re-display itself without clobbering any other output which has been displayed by other bits of code. |
In the notebook (or nteract or jupyterlab) with ipykernel, run: import time
display("hey", display_id="here")
time.sleep(0.5)
display("HEY", display_id="here", update=True)
time.sleep(0.5)
display("HEY!", display_id="here", update=True); |
Display updates only replace a single displayed output whereas |
I'd really love a way to display collections of rich objects inline like this: ipython/disp#3 @Carreau kicked off some starter pieces here: ipython/disp#8 |
Yes the I'd also like to keep the Also wondering, is clear output necessary if you can display update with None ? |
@Carreau, maybe bit OT, but it would be really nice to have an option to stack matplotlib figures horizontally instead of vertically. The horizontal scrollbar would allow to see a long list of figures without taking too much vertical space. Use case: oftentimes I generate figures (>100) in a loop, displaying one figure at time, closing the figure and moving to the next iteration. So, I am already using Is this been discussed somewhere? Can you point me to some open issue I can follow? Thanks. |
Since
display()
is becoming an IPython primitive (being automatically injected into builtins) it would be nice to make display do a little bit more. Two ideas:First, it would be nice if
display
also did the work ofclear_output()
, andclear_output(wait=True)
. For example, making it work such that:metakernel
has display that works this way and it is quite useful.Second, it would be nice to add a
sep
argument (similar toprint
)so that we can display items on the same line:display
currently puts each display in its ownspan
, so the sep might have to be a keyword rather than arbitrary HTML to allow items to appear on the same line.There may be other functionalities that would be nice to include in display(), but these two I run into often.
The text was updated successfully, but these errors were encountered: