Creating custom VertexLabels
- To: mathgroup at smc.vnet.net
- Subject: [mg126631] Creating custom VertexLabels
- From: Andre Koppel <akoppel at akso.de>
- Date: Sun, 27 May 2012 04:41:34 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
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?