Re: [Rdkit-discuss] Fwd: 2D drawing with atoms labeled by index
Open-Source Cheminformatics and Machine Learning
Brought to you by:
glandrum
From: Peter S. S. <sh...@gm...> - 2016-10-25 16:22:12
|
Hi, Hongbin, Thanks. Indeed. svg2.svg, when renamed to svg2.html, shows the correct image in Chrome. svg.html shows garbage. Still, it would be good to be able to create a real .svg file from RDKit. Best, -P. On Tue, Oct 25, 2016 at 2:35 AM, 杨弘宾 <yan...@16...> wrote: > Hi, Peter, > I don't know whether it can help you since I did not repeat your code. > But it acturally works in my computer: > change the extended name from .svg into .html and open it via > chrome. > It should be valid with svg2.svg (the namespace of svg were removed). > > ------------------------------ > Hongbin Yang > > > *From:* Peter S. Shenkin <sh...@gm...> > *Date:* 2016-10-25 13:27 > *To:* Dmitri Maziuk <dmi...@gm...> > *CC:* RDKit Discuss <rdk...@li...> > *Subject:* Re: [Rdkit-discuss] Fwd: 2D drawing with atoms labeled by index > Hi, > > Dima wrote: >> >> Try saving the text (svg/svg2) to a file and opening it in chrome (if you >> can actually open a file in chrome) or some other application. > > > I actually did that, and in a second email I reported: > >> >> - Chrome thinks svg.svg is empty >> >> >> - When I load svg2.svg, Chrome complains, "This XML file does not >> appear to have any style information associated with it. The document tree >> is shown below...." >> >> -P. > > On Tue, Oct 25, 2016 at 12:28 AM, Dmitri Maziuk <dmi...@gm...> > wrote: > >> OK, my turn: that went out too soon. >> >> It seems to me that jypiter, ipython, or whatever, has no idea how render >> MIME type image/svg+xml. It can display an "SVG" object, but the bit that >> turned image/svg+xml into "SVG" does not understand XML namespaces (that's >> been around since at least 2009). >> >> Try saving the text (svg/svg2) to a file and opening it in chrome (if you >> can actually open a file in chrome) or some other application. >> >> Dima >> >> > |