[IPython-dev] Interactive SVG is not interactive in a notebook

Benjamin Root ben.root@ou....
Sat Jun 8 09:20:15 CDT 2013


On Mon, Jun 3, 2013 at 10:58 AM, Matthias BUSSONNIER <
bussonniermatthias@gmail.com> wrote:

>
> Le 3 juin 2013 à 15:31, Benjamin Root a écrit :
>
>
> On Mon, Jun 3, 2013 at 2:58 AM, Matthias BUSSONNIER <
> bussonniermatthias@gmail.com> wrote:
>
>> Hi ben,
>> Le 3 juin 2013 à 00:43, Benjamin Root a écrit :
>>
>> > Digging further, I see that the xml data is making it to the browser,
>> but the javascript embedded within the svg file is completely stripped out.
>>  Is that on purpose?  Is there a way I can override that behavior?
>>
>> No we don't strip js out of XML by intent (yet). Have you try to use HTML
>> that itself contain a script tag, and an svg  tag with an ID so that you
>> can refer to it ?
>>
>
> Well, something is stripping it out, between the call to
> IPython.display.SVG() and what Firefox tells me it sees.  Since I need this
> to work for the tutorial, I am just going to have to assume that this is a
> bug somewhere and go for the embedded HTML approach that you suggest, since
> most of those at the tutorial would have this bug.
>
>
> Could it be linked to
> https://github.com/ipython/ipython/issues/1866 ?
>
> Can you share an ipynb so that I can take a look ?
>

Sorry for the delay... hurricane season has started.  Anyway, I attached an
ipynb and the svg for your perusal.  That notebook also has an attempt at
adding the javascript separately, but I think I am doing it wrong.  I am
not a web dev, so this is all very new to me.

Thanks!
Ben Root
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-dev/attachments/20130608/195c99a1/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SVG test.ipynb
Type: application/octet-stream
Size: 98440 bytes
Desc: not available
Url : http://mail.scipy.org/pipermail/ipython-dev/attachments/20130608/195c99a1/attachment-0001.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plot_demo.svg
Type: image/svg+xml
Size: 104837 bytes
Desc: not available
Url : http://mail.scipy.org/pipermail/ipython-dev/attachments/20130608/195c99a1/attachment-0001.bin 


More information about the IPython-dev mailing list