Color vertices in state.draw()
In a NestedBlockModel, I'm trying to color the vertices from an underlying property, and not from the grouping of the NestedBlockModel. I do the following: import graph_tool as * import graph_tool.all as gt import numpy as np g = gt.collection.data["football"] prop = g.new_vertex_property("int") prop.a = np.random.randint(0, 10, len(prop.a)) state = gt.minimize_nested_blockmodel_dl(g) state.draw(output='test1.png') state.draw(vertex_color=prop, output='test2.png') The difference between the two drawings is that when I supply the vertex_color, the boundary of the vertex will be colored differently. However, in a large state that is almost hidden to the naked eye. How can I color the whole vertex in a different color, not only the boundary? -- 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 26.05.2017 10:28, excuvator wrote:
The difference between the two drawings is that when I supply the vertex_color, the boundary of the vertex will be colored differently. However, in a large state that is almost hidden to the naked eye. How can I color the whole vertex in a different color, not only the boundary?
Use vertex_fill_color. -- Tiago de Paula Peixoto <tiago@skewed.de>
participants (2)
-
excuvator -
Tiago de Paula Peixoto