Hi Theo, The atom label placement in drawings turns out to be very tricky to do in a cross platform way. You're using the RDKit's old drawing code which we haven't been maintaining for a while now, I'd recommend either switching to using one of the convenience functions likes Draw.MolToImage() or using the Draw.MolDraw2DCairo() or Draw.MolDraw2DSVG() classes directly. I can maybe help with the decision which to use: once you've generated an image of the molecule, what do you want to do with it?
-greg On Tue, Oct 20, 2020 at 1:32 PM theozh <the...@gmx.net> wrote: > Dear RDKit-ers, > > this sounds like a simple problem, however, I haven't found a link to the > corresponding documentation. > > When I draw a structure with: > > from.rdkit.Chem import Draw > > Draw.MolToQPixmap(mol) > > The non-Carbon atom labels are not centered to the bonds, but typically > shifted downwards. > How to center them also vertically? > > https://rdkit.org/docs/source/rdkit.Chem.Draw.MolDrawing.html > Here I don't see how to center atom labels vertically. Am I missing > something? > > Thanks for hints and the right link, > Theo. > > > > > > > _______________________________________________ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss >
_______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss