Hi, I am trying to to plot a Chord diagram using the nested model, and I would like to add labels to the nodes. However the state.draw() method doesn't all directly to have passed the labels. How can I use the graph_draw() method to embed both my state and labels.
labels I would like to add (here I am writing only two) are stored in the array vprop_label (loaded as a csv file or hardcoded). This is how I am collecting the data, how do I pass vprops to state alternatively?: from graph_tool.all import * import matplotlib file_name = 'filename.csv'# where I have the edges g = load_graph_from_csv(file_name, directed=False, skip_first=False, csv_options={'delimiter': ','}) vprop_label = g.new_vertex_property("string") vprop_label[0] = "vertex one" vprop_label[1] = "vertex two" vprops = {'labels' : vprop_label} state = minimize_nested_blockmodel_dl(g) state.draw(output="my_fit.svg" )
_______________________________________________ graph-tool mailing list graph-tool@skewed.de https://lists.skewed.de/mailman/listinfo/graph-tool