I'm trying to use GraphPlot to draw a Graph which is constructed from an adjacency matrix and am having trouble with the labels in the plot. I am doing (data is a silly example) the following:
data = Import["~/test.mtx", "MatrixMarket"]
verts = {"Aa", "Ba", "Ca", "Da", "Ea"}
g = WeightedAdjacencyGraph[verts, data, VertexLabels -> "Name"]
Which correctly results in a labelled Adjacency Graph:
However, when I try and render the graph using a GraphPlot (or similar function...) I always get numbered labels instead. Eg:
GraphPlot[g,
VertexRenderingFunction -> ({White, EdgeForm[Black], Disk[#, .1],
Black, Text[#2, #1]} &)]
renders as:
My question is how can I get GraphPlot (and similar) to use the vertex names like Graph itself does? Alternatively, is there a better way of providing vertex names when using an Adjacency Matrix? (My real dataset has many thousands of vertices and edges).