g = load_graph('mydata.gml') state = gt.minimize_blockmodel_dl(g) b = state.b gt.graph_draw(g, inline=True, pos=g.vp["pos"], vertex_fill_color=b, vertex_shape=b, output="mydata.pdf") This leads to the following error: ----> 3 gt.graph_draw(g, inline=True, pos=g.vp["pos"], vertex_fill_color=b, vertex_shape=b, output="2013_blocks_mdl.pdf") /usr/lib/python2.7/dist-packages/graph_tool/__init__.pyc in __getitem__(self, key) 1419 p = self.properties[(self.t, key)] 1420 return p[p.get_graph()] -> 1421 return self.properties[(self.t, key)] 1422 1423 def get(self, key, default=None): KeyError: ('v', 'pos') My question is what g.vp["pos"] does? Thanks -- View this message in context: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/... Sent from the Main discussion list for the graph-tool project mailing list archive at Nabble.com.
On 27.01.2016 22:35, kevinc wrote:
My question is what g.vp["pos"] does?
It retrieves an internal vertex property map named "pos". Please read the documentation: https://graph-tool.skewed.de/static/doc/quickstart.html#internal-property-ma... Best, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>
participants (2)
-
kevinc -
Tiago de Paula Peixoto