Why does graph plotting crop so aggressively, and what is a work-around?
Surely, the Sage community is aware of this bug. For example, there is this ticket, in which the problem is supposed to be fixed. But it's not!
A patch is described: in sage/graphs/graph_plot.py
we can add the line(?)
G._extra_kwds['axes_pad']=.05
Am I to change this value in order to fix this over-zealous cropping behavior? No matter what I do, in this regard, I still end up with graph vertices partially cut off.
What's the easy work-around? I would like to be able to plot graphics_array
objects with several graphs (with their vertices clearly shown!).
I'm keenly interested in this too, and have been for a while (although I haven't gotten around to trying to figure it out).
Can you post code that replicates the problem and the Sage version you are using. In 4.6.2 I do: sage: g = Graph({0:{1:'a'}, 1:{2:'b'}, 2:{0:'c'}}); g.plot() --- and I get a nice triangle, no cropping occurs. I tried a bunch of other graphs from the database and they all seem fine too.
Ah.. it's probably because the `axes_pad` doesn't get passed to the graphics array.
@benjaminfjones: I am using 4.5.3. Perhaps it's time for an upgrade. :)