How can I add arbitrary text to a Graph object
I have created a Graph image such as shown below
using the commands:
D = Graph(E)
D.show(pos=posd,**GPopt)
I would like to add text or a legend (explaining the colors) to the graph, but I have not found a way to add additional text to the Graph object. Suggestions welcome.
sage: sage.plot.graphics.Graphics.show?
tells you that there is the "title" option. And also about "set_legend_options".Thanks, that's a good pointer. The "title" and title_pos" options allows me to add a single text label. But what if I would like multiple text options? Although .show() recognizes "show legend", Graph does not accept "legend_label". I would expect that there is a general way of adding multiple text to a Graph such as D += text("hello world",(1,1))
Add a node having your text as label, no frame, no edges and manually positioned ?
The mode would still show as a node with the same format that the other nodes.