vertex_color in draw_hierarchy not working
When passing a vertex property as vertext_color
parameter to function draw_hierarchy
, it spills the following error:
.../graph_tool/draw/cairo_draw.pyc in draw_hierarchy(state, pos, layout, beta, ealpha, halpha, subsample_edges, deg_order, deg_size, vsize_scale, hsize_scale, empty_branches, verbose, **kwargs)
1723 vertex_color[v] = vfcolor[v]
1724 elif vcolor is not None:
-> 1725 vertex_color[v] = vfcolor
1726 else:
1727 vertex_color[v] = vcmap(b[v] / (B - 1) if B > 1 else 0)
.../graph_tool/__init__.pyc in __setitem__(self, k, v)
443 self.__map[key] = v
444 except TypeError:
--> 445 self.__map[key] = _convert(self, v)
446
447 def __repr__(self):
.../graph_tool/__init__.pyc in _convert(prop, val)
242 vtype = _python_type(prop.value_type())
243 if type(vtype) is tuple:
--> 244 return [vtype[1](x) for x in val]
245 if vtype is object:
246 return val
TypeError: 'NoneType' object is not iterable
It does it for string
and int
vertex property types.