Hi Anthony,
It has something to do with the bounding boxes (they get scaled during the
map generation process).
Using bbox_inches='tight', however, worked for me, i.e.
image.savefig("out.png", bbox_inches='tight')
I hope this helps.
Best,
Sereina
2013/11/4 Anthony Bradley <[email protected]>
> Hi all,
>
>
>
> I’m having some difficulty trying to save the new similarity map images.
> (They’re super cool by the way!)
>
>
>
> If I do the following in a python shell:
>
>
>
> from rdkit import Chem
>
> from rdkit.Chem.Draw import SimilarityMaps
>
> image =
> SimilarityMaps.GetSimilarityMapFromWeights(Chem.MolFromSmiles("CCC"),[1,2,3])
>
> # Just a dummy image
>
> image.savefig("out.png")
>
> # The outputted image is just the bottom left hand corner
>
>
>
> The image saved is cropped to the left hand corner (saved.png). It will
> render perfectly in an IPython notebook however. (ipython.png)
>
>
>
> Am I missing something here about saving Matplotlib images?
>
>
>
> Cheers,
>
>
>
> Anthony
>
>
>
>
> ------------------------------------------------------------------------------
> Android is increasing in popularity, but the open development platform that
> developers love is also attractive to malware creators. Download this white
> paper to learn more about secure code signing practices that can help keep
> Android apps secure.
> http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
> _______________________________________________
> Rdkit-discuss mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss