I want to render a graph displaying nodes labels only inside Tooltip, not rendered on the graph.

How can I map Tooltip to all vertexes in VertexLabels -> "Name" ?

I saw: Graph, ToolTip, and Labeled: How to make a swanky graph and https://mathematica.stackexchange.com/a/17126/44334

I see a syntax like:

TreeGraph[{1, 2, 3}, {1 -> 2, 1 -> 3}, 
VertexLabels -> {"Name", 3 -> Tooltip["3", "Equation 1"]}, ImagePadding -> 20]

where Tooltip is applied to a specific node, instead I want only a Tooltip for all nodes.

In my example vertex labels would be "1", "2" and "3".

I tried with:

VertexLabels -> Tooltip["Name"]

Tooltip /@ VertexLabels -> "Name"

VertexLabels -> {Tooltip["Name"]}

1 Answer 1


You almost got it :-) It's

VertexLabels -> Placed["Name", Tooltip]

This usage is shown in VertexLabels -> Scope -> Label Specification.

  • $\begingroup$ Doh! Thank you @Szabolcs $\endgroup$
    – user305883
    Nov 6, 2016 at 20:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.