Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • graph-tool graph-tool
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 56
    • Issues 56
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

Please use the issue tracker only to report bugs (i.e. errors in the library that need to be fixed) or feature requests.

For questions about how to compile, install or use the library, please use instead either the web forum at https://forum.skewed.de/c/graph-tool or the mailing list at https://graph-tool.skewed.de/mailing


(If unsure, use the forum or mailing list first.)


When opening new issues, please choose the BUG template from the drop-down menu, and fill out the required information.

  • Tiago Peixoto
  • graph-toolgraph-tool
  • Issues
  • #238
Closed
Open
Issue created Jul 20, 2015 by Darko@darko

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.

Assignee
Assign to
Time tracking