[IPython-dev] fancyboxes in IPython Notebooks

Matthias Kümmerer matthias at matthias-k.org
Wed Oct 23 10:33:53 EDT 2013


Hi all,

I am a PhD student in computational neuroscience and I am using IPython 
Notebooks besides data analysis etc. for keeping my lab journal, where I 
document my results. For that, I save the figures that I want to have in the 
lab journal in a subfolder and include them in the notebook using markdown 
(actually I wrote a small library some to automate this process. It is still 
very alpha, but very useful for me [1]).

For the lab journal, I would prefer to have my plots only as small pictures 
included to make scrolling trough the notebook easier. But of course at some 
point I may need the actual plot in full resolution. Thus I thought it would 
be great, if there is an easy way to make the images clickable with the full 
size image appearing after an click, e.g. using jquery fancybox (see [2] or 
[3] for an older version). Basically this is very easy to use, but I am not 
sure how I could make it usable in the notebook. The easiest way would be just 
to include fancybox somehow and write the html-code in the markdown cells for 
the href:

<a class="fancybox" rel="group" href="big_image_1.jpg"><img 
src="small_image_1.jpg" alt="" /></a>

but then still some javascript code has to deal with creating the fancy box. 
It would probably be more elegant to have some kind of extension in the 
IPython Notebook that deals with this automatically and converts markdown 
images in fancy box links.

I would be very interested in this feature and I am definitely willing to 
invest some time on this if you could give me some hints how this could be 
plugged into IPython Notebook best.

Thanks for your help and the work on IPython!
Best,
  Matthias



[1] https://github.com/matthias-k/ipython-journal
[2] http://fancyapps.com/fancybox/
[3] http://fancybox.net/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20131023/8075208a/attachment.sig>


More information about the IPython-dev mailing list