8
$\begingroup$

This doesn't work:

Mathematica graphics

Is there a way to do this? My real goal is to identify the second links in the graph below, which shows the results of a webcrawl (using this code). I'm open to another approach.

Mathematica graphics

$\endgroup$
7
$\begingroup$
Graph[{1, 2, Tooltip[3, "Label"]},
     {1 \[UndirectedEdge] 2, 2 \[UndirectedEdge] 3, 3 \[UndirectedEdge] 1}]

Mathematica graphics

$\endgroup$
10
$\begingroup$

You can also explicitly label using VertexLabels and use Tooltip as the positioning:

Graph[{1 -> 2, 1 -> 3, 1 -> 4, 1 -> 5}, 
    VertexLabels -> {5 -> Placed["five", Tooltip]}, ImagePadding -> 20]

enter image description here

$\endgroup$
  • $\begingroup$ How do I accept both answers? $\endgroup$ – George Wolfe Oct 19 '12 at 19:34
  • $\begingroup$ @GeorgeWolfe You can't... You can upvote both if you like them and they answered your question, but you can accept only one answer. Typically I suggest that people accept the one that they found the most useful or the one they ended up using in their code or the clearest one. However, different people have widely different metrics to break ties, ranging from tossing a coin to looking at the time stamps or accepting the answer from the lower rep user (I realize I lose out on the last two). Feel free to choose as you wish :) $\endgroup$ – rm -rf Oct 19 '12 at 19:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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