[IPython-dev] [Notebook 1.0.0] Display two png images side by side

Francesco Montesano franz.bergesund@gmail....
Mon Sep 2 08:32:43 CDT 2013


Dear List,

I have a script that produces some image and I'm creating a notebook for
testing/logging.

For comparison reasons, I would like to load to images in a cell and show
them side by side.

from IPython.display import Image
constr = Image(filename="fig1.png")
sigma = Image(filename="fig2.png")
display(constr, sigma)


put the figures one after the other. I've tried to play with the width
keyword, but that does not help.

Making an HTML table with the output of "Image" does not work (I don't know
if I should add "of course")

s = """<table>
<tr>
<th>{f1}</th>
<th>{f2}</th>
</tr>""".format(f1=constr, f2=sigma)
t=HTML(s)
display(t)

Is there any way to do what I want directly in the notebook? (I guess that
there is some python library to do it, but I think that the notebook should
be able to do it)

Cheers,

Fra
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-dev/attachments/20130902/53d9da35/attachment.html 


More information about the IPython-dev mailing list