Hi Ed,

I think this is related to a previous mailing list item (
https://www.mail-archive.com/[email protected]/msg03528.html
).

It has something to do with the bounding boxes (they get scaled during the
map generation process). In the previous case it was enough to set
bbox_inches='tight' when saving the image to solve the problem.

Best,
Sereina


2014-07-16 17:04 GMT+02:00 Edward Pyzer-Knapp <[email protected]>:

> Hi,
>
> I am trying to replicate the tutorial on visualising maps of gasteiger
> charges.
>
> >>> from rdkit.Chem.Draw import SimilarityMaps>>> mol = 
> >>> Chem.MolFromSmiles('COc1cccc2cc(C(=O)NCCCCN3CCN(c4cccc5nccnc54)CC3)oc21')>>>
> >>>  AllChem.ComputeGasteigerCharges(mol)>>> contribs = 
> >>> [float(mol.GetAtomWithIdx(i).GetProp('_GasteigerCharge')) for i in 
> >>> range(mol.GetNumAtoms())]>>> fig = 
> >>> SimilarityMaps.GetSimilarityMapFromWeights(mol, contribs, colorMap='jet', 
> >>> contourLines=10)
>
>  However when I visualise the image:
> >>> fig.show()
>
> The window only shows a small portion of the image.  Saving the figure has
> the same problem.
>
> Any help much appreciated!
>
> Ed Pyzer-Knapp
>
>
> ------------------------------------------------------------------------------
> Want fast and easy access to all the code in your enterprise? Index and
> search up to 200,000 lines of code with a free copy of Black Duck
> Code Sight - the same software that powers the world's largest code
> search on Ohloh, the Black Duck Open Hub! Try it now.
> http://p.sf.net/sfu/bds
> _______________________________________________
> Rdkit-discuss mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to