Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- g =
- Graph[{2 [DirectedEdge] 3},
- VertexLabels -> "Name", EdgeLabels -> {2 [DirectedEdge] 3 -> "hallo"}]
- g1 = VertexReplace[g, Thread[VertexList[g] -> ToString /@ VertexList[g]]];
- g =
- Graph[{{1,2} [DirectedEdge] {2,3}},
- VertexLabels -> "Name", EdgeLabels -> {{1,2} [DirectedEdge] {2,3} -> "hallo"}]
- In[15]:= Fold[
- SetProperty[{#1, #2}, VertexLabels -> ToString[#2]] &, g,
- VertexList[g]]
- During evaluation of In[15]:= SetProperty::pvobj: $Failed is not an object with properties.
- Out[15]= SetProperty[{$Failed, {2, 3}}, VertexLabels -> "{2, 3}"]
- g =
- Graph[{2 [DirectedEdge] 3},
- VertexLabels -> "Name",
- EdgeLabels -> {2 [DirectedEdge] 3 -> Style[" hello ", Background -> White]}]
- Fold[SetProperty[{#1, #2}, VertexLabels -> ToString[#2] <> "*"] &, g, VertexList[g]]
Add Comment
Please, Sign In to add comment