Search code examples
graphicswolfram-mathematicamathematica-8

Graph[] cuts off vertex labels in Mathematica


Graph[] has a tendency to cut off vertex labels in Mathematica. I am looking for a robust workaround.

Example:

Graph[{1 -> 2, 2 -> 3, 3 -> 1}, VertexLabels -> "Name"]

Graph[] cuts off the label '2'

My present workaround:

SetOptions[Graph, ImagePadding -> 12]

This is not robust because the value of ImagePadding needs to be manually adjusted depending on the label size.


Solution

  • Apparently using FullGraphics on the Graph object will fix the clipping for the purpose of display, at the expense of interactivity.

    Per the comment below, Show[] works as well, and avoids modifying the graphics.