Unnecessary large white margin for graph with bezier curve
With the help from kglr (deleted comment):
Graphics[Show[Graph[{1 -> 1, 1 -> 1}]][[1]]]
which works by using Show
to convert the graph to a Graphics[]
object, and then constructing a new graphic using only the primitives and directives, but none of the options.
In this case PlotRangePadding
is the option that causes the extra space, so using something like
Graph[{1 -> 1, 1 -> 1, 1 -> 1}, PlotRange -> 0]
or
Show[Graph[{1 -> 1, 1 -> 1}], PlotRangePadding -> None]
will only affect that particular option.
Another work around, adding a dummy vertex at the same coordinate seems to make things happy.
Graph[{1, 2}, {1 -> 1, 1 -> 1, 1 -> 1},
VertexCoordinates -> {{0, 0}, {0, 0}}]
try also:
Graph[{1 -> 1, 1 -> 1, 1 -> 1}, PlotRange -> 0]