Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a question about visualization of network in Mathematica:

for example: for this network

g = ExampleData[{"NetworkGraph", "Friendship"}];

when we calculate ClosenessCentrality[g] and visualize with

HighlightGraph[g, VertexList[g], VertexSize -> Thread[VertexList[g] -> Rescale[%]]]

Mathematica graphics

We can not see the vertex of James. Why? The value exists and is positive.

share|improve this question
Try removing Rescale, as this will set the minimum of the list to 0, i.e. HighlightGraph[g, VertexList[g], VertexSize -> Thread[VertexList[g] -> ClosenessCentrality[g]]] – Pinguin Dirk Jul 17 '13 at 11:27
Exactly!!! thank you for this fast response! – Dural Akata Jul 17 '13 at 11:31
But we can not see the weight clearly? – Dural Akata Jul 17 '13 at 11:34
See the documentation of Rescale for other parameters on how to rescale the output of ClosenessCentrality[g], e.g. Rescale[ClosenessCentrality[g], {0, 1}, {0.01, 1}] or any other transform (e.g. simply HighlightGraph[g, VertexList[g], VertexSize -> Thread[VertexList[g] -> 0.1 + Rescale[ClosenessCentrality[g]]]] ), whatever you desire! Not knowing what you actually want to achieve leaves me guessing – Pinguin Dirk Jul 17 '13 at 11:42
I do it I understand Pinguin Dirk thank you! – Dural Akata Jul 17 '13 at 11:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.