Services & Resources / Wolfram Forums / MathGroup Archive

MathGroup Archive 2012

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

Search the Archive

Creating custom VertexLabels

  • To: mathgroup at
  • Subject: [mg126631] Creating custom VertexLabels
  • From: Andre Koppel <akoppel at>
  • Date: Sun, 27 May 2012 04:41:34 -0400 (EDT)
  • Delivered-to:

I am using the Graph-Function to create a Vertex,
The Vertex List itself contains several different Textx, that I like to 
show, VertexLabels -> "Name" can't be used, becaus it did not look nice 
and I like to convert the name before showing it.
I have written an own Function:

labeler[{xc_, yc_}, name_, {w_, h_}] :=
   Block[{xmin = xc - w - slen[name]*0.01 .4,
     xmax = xc + w + slen[name]*0.01, ymin = yc - h, ymax = yc + h},
    Rectangle[{xmin, ymin}, {xmax, ymax},
     RoundingRadius -> If[NumberQ[name], 0.03, 0, PlotLabel -> name]]

This function was called within the Graph-Function. The rectangle was 
shown at the right place, but I have not found any way to put the "name" 
into the graphic. Is there any Idea how to Plot a label while
using the labeler-Function?

  • Prev by Date: Re: Stop on message?
  • Next by Date: Button operation that indicates start and finish of simulation
  • Previous by thread: Re: Sqrt of complex number
  • Next by thread: Button operation that indicates start and finish of simulation