MobleyLab / Lomap

Alchemical mutation scoring map
MIT License
37 stars 17 forks source link

graph visualisation issues #37

Closed ppxasjsm closed 2 years ago

ppxasjsm commented 5 years ago

Running the example script on the networkx2 branch I get the following error:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-6-01daf4821019> in <module>()
----> 1 nx_graph = db_mol.build_graph()

~/miniconda3/envs/lomap/lib/python3.5/site-packages/lomap-0.0.0-py3.5.egg/lomap/dbmol.py in build_graph(self)
    588         # Display the graph by using Matplotlib
    589         if self.options.display:
--> 590             Gr.draw()
    591 
    592         return self.Graph

~/miniconda3/envs/lomap/lib/python3.5/site-packages/lomap-0.0.0-py3.5.egg/lomap/graphgen.py in draw(self)
   1080         # print 'Graph .png file has been generated...'
   1081 
-> 1082         plt.show()
   1083 
   1084         return

~/miniconda3/envs/lomap/lib/python3.5/site-packages/matplotlib/pyplot.py in show(*args, **kw)
    242     """
    243     global _show
--> 244     return _show(*args, **kw)
    245 
    246 

~/miniconda3/envs/lomap/lib/python3.5/site-packages/ipykernel/pylab/backend_inline.py in show(close, block)
     37             display(
     38                 figure_manager.canvas.figure,
---> 39                 metadata=_fetch_figure_metadata(figure_manager.canvas.figure)
     40             )
     41     finally:

~/miniconda3/envs/lomap/lib/python3.5/site-packages/ipykernel/pylab/backend_inline.py in _fetch_figure_metadata(fig)
    172     """Get some metadata to help with displaying a figure."""
    173     # determine if a background is needed for legibility
--> 174     if _is_transparent(fig.get_facecolor()):
    175         # the background is transparent
    176         ticksLight = _is_light([label.get_color()

~/miniconda3/envs/lomap/lib/python3.5/site-packages/ipykernel/pylab/backend_inline.py in _is_transparent(color)
    193 def _is_transparent(color):
    194     """Determine transparency from alpha."""
--> 195     rgba = colors.to_rgba(color)
    196     return rgba[3] < .5

AttributeError: module 'matplotlib.colors' has no attribute 'to_rgba'

All dependencies were installed using conda, i.e. conda install networkx conda install graphviz conda install pyQt=4

matplotlib version: '1.5.1' networkx version: '2.2' python version 3.5

Initialisation was done with:

db_mol = lomap.DBMolecules('path', parallel=12, display=True, output=True, verbose='info')
davidlmobley commented 5 years ago

Thanks. Definitely some work to be done here. Unfortunately I don't have anyone in the group working on this right now, so it probably falls to me (which means it will take a while) unless @shuail or @nividic is in a position to help (but they have other jobs).

ppxasjsm commented 5 years ago

I found the issue. It works fine with matplotlib version: '2.0', which I think would need to be a hard requirement.

davidlmobley commented 2 years ago

Closing this; maintenance moved to github.com/OpenFreeEnergy/Lomap.