So if I want a vertex to have multiple colors (fractions), what should the pv1 look like? Please look at my question description. Thanks, Sukrit On 06-Oct-2017 6:35 PM, "Tiago de Paula Peixoto" <tiago@skewed.de> wrote: On 06.10.2017 02:47, isukritgupta wrote:
This should reproduce the error: g = Graph() v1 = g.add_vertex() v2 = g.add_vertex() e = g.add_edge(v1, v2) pv1 = g.new_vertex_property("vector<int>"); pv1.set_2d_array(np.zeros((2, 2))) graph_draw(g, vertex_shape="pie", vertex_pie_fractions=pv1, edge_gradient=None, output="lesmis-sbm-marginals.svg")
Why do you want pies with all zero fractions? What would that accomplish? You should be doing something like: g = Graph() v1 = g.add_vertex() v2 = g.add_vertex() e = g.add_edge(v1, v2) pv1 = g.new_vertex_property("vector<double>", val=(.2, .8)) graph_draw(g, vertex_shape="pie", vertex_pie_fractions=pv1) But I agree it should not crash if the input is invalid. I'll fix this behavior. Best, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de> _______________________________________________ graph-tool mailing list graph-tool@skewed.de https://lists.skewed.de/mailman/listinfo/graph-tool