I’m going through the igraph examples in python, and keep encountering this problem.

The outermost vertices are partially outside of the bounding box. The example doesn’t have this problem nearly as badly.
(Also, in mine, it seems to be drawing additional lines for two-way connections, whereas in the example, it’s just putting an arrow on each side. If this is an easy fix, please let me know.)
My code, copied from the example page, is below.
g = Graph.Kautz(m=3, n=2)
adj = g.get_adjacency()
fig.add(g, layout="fr", vertex_label=None)
fig.add(adj, bbox=(360, 0, 480, 120), grid_width=0, opacity=0.7)
fig.show()
My installation details are here.
No configuration file, using defaults
igraph 0.6 running inside Python 2.7.3 (default, Aug 1 2012, 05:16:07)
[GCC 4.6.3] on linux2
I’d be very grateful for any help!
Curved edges were introduced into the graph drawer of igraph later than the time when that figure was made in the documentation, so that’s why you haven’t seen the curved edges in the figure of the documentation. Anyway, curved edges can easily be disabled:
or
As for the edges that do not fit in the bounding box: the
plot()function (which is the one-shot function for quick plots) has amarginkeyword argument that puts a white margin around the graph plot; this is essentially done by contracting the bounding box of the figure by a given number of pixels to ensure that the edges stay inside (most of the time). When you construct your own plot by working directly with theplotclass, you have to add a margin yourself:Another difference between the built-in
plotfunction and thePlotclass is that theplotfunction adds a white background by default, whilePlotuses a transparent background. You can override that by using thebackgroundkeyword argument of thePlotconstructor.