[IPython-dev] [EXTERNAL] Re: A fresh approach for plotting?

Shead, Timothy tshead at sandia.gov
Wed Apr 16 18:22:30 EDT 2014


Paul:

Many thanks for this, I was just trying (unsuccessfully) to get the matplotlib SVG backend working in a notebook.  Now that I know it’s there, I plan to fight it ;-)

All kidding aside, this really highlights / clarifies what is & isn’t different about my approach: what I’m doing is building an API than can capture an explicit, abstract representation of what’s changing in the plot from one animation frame to the next.  It’s like a video codec that only stores the pixels that change from frame-to-frame, except I’m storing a compact representation of API calls instead of pixels.  With that information, I can generate a sequence of bitmap images which is nothing new, or a video which is also nothing new, or (this is new part) one SVG plus JavaScript to manipulate it during playback.

Matthias:

I’m not sure whether I grok plot.ly, but it seems to require sending my data to someone else’s server, which is a complete nonstarter for me.

Cheers,
Tim

On Apr 16, 2014, at 3:41 PM, Paul Ivanov <pi at berkeley.edu> wrote:

> Shead, Timothy, on 2014-04-16 20:58,  wrote:
>> I will definitely check these out.  I’m also going to ping the
>> matplotlib folks to see if they’ve considered an SVG backend.
>> If they did, I probably wouldn’t fight it :)
> 
> matplotlib has an SVG backend, here's how you use it in the
> notebook:
> 
>    %matplotlib inline 
>    import matplotlib.pyplot as plt
>    import numpy as np
>    from IPython.display import set_matplotlib_formats
>    set_matplotlib_formats('svg')
>    x,y,z,c = np.random.randn(4, 20)
>    plt.scatter(x,y, s=np.abs(z)*100, c=c)
> 
> http://nbviewer.ipython.org/gist/ivanov/10935754
> 
> best,
> -- 
>                   _
>                  / \
>                A*   \^   -
>             ,./   _.`\\ / \
>            / ,--.S    \/   \
>           /  `"~,_     \    \
>     __o           ?
>   _ \<,_         /:\
> --(_)/-(_)----.../ | \
> --------------.......J
> Paul Ivanov
> http://pirsquared.org
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev

Timothy M. Shead
Sandia National Laboratories
1461, Scalable Analysis and Visualization

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3216 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140416/4ee8b611/attachment.bin>


More information about the IPython-dev mailing list