[IPython-dev] notebook plots via javascript

Bob McElrath bob+ipython at mcelrath.org
Thu Jun 7 17:50:35 EDT 2012


I really want to improve the figure quality of the notebook.  So, I made a stab
in this direction by changing the default figure to SVG, making them
transparent, and improving their quality a bit.  You can see it in my branch:
    https://github.com/mcelrath/ipython/tree/svg_figures

While this isn't interactive javascript yet, we can begin attaching some
javascript to the SVG DOM elements.

It turns out to get decent quality SVG figures, you have to set the
figure.figsize fairly high.  SVG doesn't know about or obey the DPI setting, but
the low value of figsize was causing some pixelation, which is why the SVG
figures produced by the notebook looked worse than the PNG figures.

--
Cheers, Bob McElrath

"The individual has always had to struggle to keep from being overwhelmed by
the tribe.  If you try it, you will be lonely often, and sometimes frightened.
But no price is too high to pay for the privilege of owning yourself." 
    -- Friedrich Nietzsche



More information about the IPython-dev mailing list