My solution is :

foo = frame.assign(legend= frame['Notebook'] + ' / ' + frame['IC50'])
print([str(x) for x in  foo.columns])

img = PandasTools.FrameToGridImage(titi, column='ROMol',
molsPerRow=10,subImgSize=(200,200),\
                                   legends=[str(x) for x in titi['legend']]
)
img.save('serie1.png')

then,
foo.drop('legend', axis='columns', inplace=True)  # dropping/removing a
column

Cheers, FR.

2017-04-14 14:23 GMT+02:00 François-Régis Chalaoux <chalaou...@gmail.com>:

> Hi,
>
> I would like to save a legend  for each molecule of the grid with 2 infos
> (Notebook and IC50) but my code below does not work :
>
> img = PandasTools.FrameToGridImage(frame, column='ROMol',
> molsPerRow=10,subImgSize=(200,200), legends=[str(x) for x in
> frame[['Notebook','IC50']]] )
>
> Any idea ?
>
> FR.
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to