I am finding that some functions that accept a graph and return a transformed graph lose all the vertex and edge labels of the graph being transformed. For example, when I define a graph like this:
g = Graph[{
Property["a" -> "b", EdgeLabels -> "one"],
Property["b" -> "c", EdgeLabels -> "two"],
Property["c" -> "d", EdgeLabels -> "three"],
Property["a" -> "c", EdgeLabels -> "four"]},
VertexSize -> Medium, VertexLabels -> Placed["Name", Center]]
The graph g has both edge and vertex labels. Now, I would like to create a neighborhood graph around vertex "a":
NeighborhoodGraph[g, "a"]
When I do this, I find that the new graph created does not have vertex or edge labels. I would like to be able to use these graph manipulation functions, but I need to keep the graph attributes. A graph with no labels is not very useful to me. Any help is appreciated!



