Commit 42d0f5fe authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

Avoid strict requirement on matplotlib

This removes a strict requirement on matplotlib in the "draw" module.
parent 12f0069b
......@@ -67,7 +67,7 @@ def graph_draw(g, pos=None, size=(15, 15), pin=False, layout=None, maxiter=None,
ratio="fill", overlap="prism", sep=None, splines=False,
vsize=0.105, penwidth=1.0, elen=None, gprops={}, vprops={},
eprops={}, vcolor="#a40000", ecolor="#2e3436",
vcmap=matplotlib.cm.jet, vnorm=True, ecmap=matplotlib.cm.jet,
vcmap=None, vnorm=True, ecmap=None,
enorm=True, vorder=None, eorder=None, output="",
output_format="auto", returngv=False, fork=False,
return_bitmap=False, seed=0):
......@@ -356,6 +356,12 @@ def graph_draw(g, pos=None, size=(15, 15), pin=False, layout=None, maxiter=None,
else:
enorm = lambda x: x
if vcmap is None:
vcmap = matplotlib.cm.jet
if ecmap is None:
ecmap = matplotlib.cm.jet
nodes = {}
# add nodes
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment