Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Vertex labeling

  • To: mathgroup at smc.vnet.net
  • Subject: [mg54003] Re: [mg53979] Vertex labeling
  • From: yehuda ben-shimol <benshimo at bgu.ac.il>
  • Date: Sun, 6 Feb 2005 00:45:42 -0500 (EST)
  • References: <200502050817.DAA22324@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

ShowGraph[] has an option VertexLabel to control this.
you have to set the vertex lables before that
for example
<< DiscreteMath`Combinatorica`
g = CompleteGraph[5];
g = SetVertexLabels[g, StringJoin["VV", ToString[#]] & /@ Range[V[g]]];
this will create the K5 graph with labels VV1 to VV5.
Then use ShowGraph as mentioned above
yehuda

Steve Gray wrote:

>I'm using the graph functions in Combinatorica. Is there a built-in way to get vertex labels
>displayed when doing ShowGraph? My graphs have up to about 50 vertices at most. (Obviously the label
>display should remain correct after AddEdges, DeleteEdges, AddVertices, etc.) I don't see any vertex
>labeling option for this function.
>	Thanks for any information.
>
>Steve Gray
>
>  
>


  • Prev by Date: Re: evalutating expression at different values
  • Next by Date: Re: evalutating expression at different values
  • Previous by thread: Re: Vertex labeling
  • Next by thread: Re: Vertex labeling