Matplotlib legends and title example using graph-tool
Hi, Firstly, Thank you for your work.
I am using your project to graph a big network. And now I want to add legends and titles.
Is it possible to post an example of how to do this?
For the moment I have a piece of code which is not working. And I cant find anything clear on how to do this in the documentation. This issue is more a request for a more accurate description of the documentation in this specific domain.
And it could be very usefull for people googling this.
# cairo backend is enabled
<...>
fig, ax = plt.subplots()
width = 1000
height = 1000
ax.set_title('A title')
graph_draw(g,
vertex_text=g.vertex_index,
#groups=g.vertex_properties["type"],
vertex_fill_color=g.vp.color,
vertex_font_size=13,
output_size=[width, height],
mplfig=ax, # this var is here
output=filename+'-'+type+"-graph.png")
plt.savefig(filename+'-'+type+"-graph.png")