[IPython-dev] Notebook: Horizontal layout for multiple figures in output cell
Fri Feb 21 12:49:32 CST 2014
I often have the same desire as Antonino, for much the same reasons.
Creating subplots is really not an appropriate solution. The separate
figures are exactly that, separate figures. It is semantically
incorrect to combine them into one figure, and causes additional
complications when I want to save them to a file (for example if I want
to include them in a manuscript) -- if I have combined them as subplots,
then when I want to save them, I must re-separate them.
Antonino, at one point, with a much older (pre 1.0) version of the
notebook, I found a way to hack the notebook CSS so that output cells
would float left. This was a (nearly) perfect solution for me.
However, I suspect it might not work anymore with newer versions of the
notebook. When I updated to a post 1.0 version, I never took the time
to get it working again. But perhaps that idea is a starting point for
you. Take a look at the HTML structure of the notebook and output
cells, and then fiddle with the CSS (in whatever way is now appropriate)
until you get something that works better for you.
On 02/21/2014 12:13 PM, Patrick Surry wrote:
> If you're using matplotlib for your plots, you can use subplots to
> create a horizontal (or arbitrary grid) of plots in an output cell.
> Try this example
> but change plt.subplot(2,1,1) and plt.subplot(2,1,2) (which indicate a
> 2x1 grid and plot #1 and #2) to plt.subplot(1,2,1) and
> plt.subplot(1,2,2) which does the same in a 1x2 grid.
> IPython-dev mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev