The vertex labels when I plot the graph in ipython notebook inline are all messed up. This problem does not exist when I look at graph.pdf (see code below). I do not have enough stackoverflow reputation to post images here, but I have the pdf file and I can send it over if anyone is interested.
Here is the code snipet:
layout = g.layout("random")
visual_style = {}
visual_style["vertex_label"] = g.vs["label"]
visual_style["vertex_label_size"] = 2
visual_style["vertex_color"] = [color_dict[vert] for vert in g.vs["label"]]
visual_style["bbox"] = (500,500)
visual_style["margin"] = 20
visual_style["layout"] = layout
plot(g, 'graph.pdf', **visual_style)
In short, g contains my graph, and is created using a list of vertices and a list of edges.
g = Graph(vertex_attrs={"label": vertices}, edges=edges, directed=False)
The vertices of g have labels. These labels are things like, 'WRL-Africa' , 'SOC-crime' , 'SPO-soccer' and etc.
Each label is associated with a color through color_dict as follows,
color_dict = {'WRL-Africa':'#A52A2A', 'SOC-crime':'#006400', 'SPO-soccer':'#B22222'}
Why is this happening? It seems to be a bounding box issue. Thanks in advance for any help.