New answers tagged

2

framedWithColor[color_] := Function[{position, label}, {Text[Framed[label, Background -> color], position]} ]; TreeForm[ {{1, 2}, {3, 4}}, VertexRenderingFunction -> framedWithColor[Pink] ]


6

No, this is not a bug in VertexDelete. Some background first: TreePlot, along with GraphPlot, is an old function that predates the introduction of Graph objects. Consider it deprecated that is only kept for backwards compatibility. The proper way to display vertex labels for a Graph object is g = CompleteKaryTree[5, DirectedEdges -> True, ...


2

There is no bug. Vertices 11 and 12 were indeed deleted from a. a = CompleteKaryTree[5, DirectedEdges -> True]; VertexList@a {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31} c = VertexDelete[a, {11, 12}]; VertexList@c {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 13, 14, 15, 16, 17, 18, ...



Top 50 recent answers are included