Hi Christian,

 

My approach to addressing this issue was to parse the SVG file using Python (it 
is an editable XML document) and move the atoms slightly.  I realize this is 
outside of OpenBabel but it could be helpful.

 

Thanks,

 

-          Lee-Ping

 

From: Christian Meisenbichler [mailto:chmb...@gmail.com] 
Sent: Tuesday, October 28, 2014 7:30 AM
To: openbabel list
Subject: Re: [Open Babel] 2d SVG Label positions

 

I am sorry to ask again, but are there really no suggestions how to get rid of 
this label displacements? 

 

 

Greetings!

 

On Fri, Oct 24, 2014 at 9:40 AM, Christian Meisenbichler <chmb...@gmail.com> 
wrote:

Dear babel list!

 

I am using babel to generate 2D structure pictures. It is working nicely for 
the most part. Babel is a remarkable project. However, I do have a problem that 
is haunting me.

 

Sometimes the position of the Atom labels is wrong. Not always, just sometimes 
but often enough to be annoying. I generate the svg from cml like so: 

 

babel -icml -osvg -xC

 

One molecule where I have this problem is: 001125a9.svg it was generated from 
001125a9c99911424defb45b6984e6cf53676e19 (2).cml. (attached files)

Some "Si" Labels are positioned nicely others are off by about one character 
width. I could not find a general rule for what causes this. Have you seen this 
before?

 

Also for PNGs the problem persists:



Thank you!

 

Greetings!

 

Christian
​

 

------------------------------------------------------------------------------
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to