Skip to content
This repository has been archived by the owner on Apr 8, 2022. It is now read-only.

graph visualisation issues #37

Closed
ppxasjsm opened this issue Sep 27, 2018 · 3 comments
Closed

graph visualisation issues #37

ppxasjsm opened this issue Sep 27, 2018 · 3 comments

Comments

@ppxasjsm
Copy link
Collaborator

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
Copy link
Member

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
Copy link
Collaborator Author

ppxasjsm commented Oct 8, 2018

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

@davidlmobley
Copy link
Member

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants