how to show multiple plots into a jupyter notebook page, without "subpages" - jupyter-notebook

I've done a code in a jupyter notebook cell which draws many different plots and everything works fine, except the way jupyter show them, which I do not like very much, as you can see in the following picture
As you can see, plots are reported into a kind of subpage with a scroll bar by side, while what I'd like is just a sequence of such plots into the some page where I've written the code, without any annoying subpage or the like.
Can you suggest me anything, please?

Related

Permanently linking sections of two jupyter notebooks

I have two jupyter notebooks. The middle sections of both are identical, being code to create charts. But for various reasons, the first sections (data inputs) and end sections (the charts themselves) are different.
I want to link the middle sections, so when I change the code for the charts, I can do it in just one file, and the changes will automatically show in the second.
%%writefile in one file and %load to recreate the middle sections works, but isn't a good solution, as I am often revising the charts. Is there a better solution?

How can I display a markdown reference/cheatsheet within JupyterNotebook

I could swear that several times when working in a Jupyter Notebook, I inadvertently hit some shortcut key that popped up a markdown cheatsheet, within the Notebook window, but I cannot figure out how to access this cheatsheet intentionally, via shortcut or menu. I've searched the Jupyter Notebook docs, but I'm not finding anything.
I am able to access a Markdown guide on GitHub, in a separate page, but not the cheatsheet that appears within the Notebook, similar to the way the "command palette" opens within the Notebook, as a pop-up. The latter is much handier, as it doesn't involve jumping back and forth between browser tabs.

Holoviews (Bokeh) with reveal.js

I have a presentation with Holoviews (Bokeh) interactive plots. The presentation works fine with rise (inside the notebook), but when I convert it to slides with reveal.js (v3.6.0) locally, the output doesn't show up. Even post serving through the CDN doesn't fix the issue. Anyone encountered this before?
I raised an issue on the RISE site about this problem once I was able to reproduce it, and the RISE author pointed me to this issue on the Bokeh site that let me get it working in my case. The solution is simply not to tell RISE to skip the cell that contains hv.extension("bokeh"). That cell loads BokehJS, which is needed for any Bokeh-based plots to show up, and skipping it works fine for a live presentation but apparently not for any exported version. After telling RISE not to skip that cell, my example notebook now works fine when converted to .html using jupyter nbconvert --to slides Bednar_INDEX_2018.ipynb, and it can be converted to PDF as described in the RISE documentation. The PDF output isn't formatted perfectly, but the plots do all show up at least.

Bokeh - Adding a new plot on click of a button

I am using bokeh to plot some graphs. I will be using bokeh serve to serve a python notebook. My use case is as follows:
The page will load with a text box and button. Based on the data that is entered into the text box , I need to show different graphs on button click.
What is the best way to go about it. I have tried adding the plot to the current doc and such. but none of them seem to be working.
I am using bokeh 0.11.1

uiOutput not displaying with shiny server

I have a shiny app that is working fine locally, whether I open it in a window or the browser, but after putting it onto our shiny server I am getting some unexpected behavior.
I have two plots that get displayed using uiOutput. The first displays after loading a data file, and the second is just a zoomed plot which appears when the user selects a region from the first plot and double clicks. After putting this app on our server and using it in a browser, the first plot appears when the user uploads a file, but the second plot will not display (it is completely blank - no data points, axes or labels).
What is strange is that the data in this second plot can still be interacted with. I have included hover functionality so that when the user hovers over a point in the second plot, information gets displayed about the point in a small text window. Even though the second plot never appears, if I move the mouse over the region where the plot should be, this hover information gets displayed correctly. Depending on the size of the region selecting for zooming (i.e. if it is large), the zoomed image may not fit in the window making scrollbars necessary. If I select a large region for zooming, scrollbars appear as if the image is there, but the plot is as I said blank. I can render the zoomed plot as a pdf and that looks correct, but this isn't what I want.
As I said, everything works fine locally and this only happens after putting the app on our server. The same thing happens in Firefox, Safari and Chrome. This has to be something related to the shiny server but I have no idea what as both plots are being rendered in the same way.
I've managed to figure this out. In server.R when I generate the zoomed plot, I am doing two things. First, I am creating a pdf as follows:
pdf("z_plot.pdf")
plot()
...
dev.off()
The purpose of this is to have a plot that can be downloaded if required. After this, I am issuing the commands to render the plot in my shiny app. This is all being done in the same reactive expression, which for some reason works locally but when run on a shiny server only the pdf gets generated. I just had to separate the plotting commands into two reactive expressions and everything worked fine.

Resources