damianavila / RISE

RISE: "Live" Reveal.js Jupyter/IPython Slideshow Extension
Other
3.68k stars 416 forks source link

Show a cell and the figure it creates on separate slides? #562

Closed AllenDowney closed 4 years ago

AllenDowney commented 4 years ago

I am new to RISE so this might be a dumb question.

I have several cells that contain a chunk of code that generates a figure.

I'd like to show the code on one slide and the figure on the next. Is that possible?

Currently it shows code and figure on the same slide and it often doesn't fit.

And it seems like you can't scroll within a slide, right?

Thanks!

parmentelat commented 4 years ago

Hi

No I am sorry I don't know how to do that with the current code Nothing obvious at least

AllenDowney commented 4 years ago

Ok, thanks.

I found that there is an option to create a scrollbar. I will see if I can get that working.

damianavila commented 4 years ago

Nothing obvious at least

That's correct, input and output belong to cells and cells belong to slides. So it is not possible to show some input in one slide and the output in another. You could work around the issue probably duplicating cells and with some extension hidden the output in the first one and the input in the second one. But that's an ugly workaround :wink: Scrolling as you said could be the most straightforward workaround.

AllenDowney commented 4 years ago

Yes, I got scrolling working. I also worked around it by defining a function to draw the figure (one cell) and then calling the function (second cell). That worked well. It also provides the option to hide the first cell if the details of the function are not interesting.

Thanks, @damianavila !