Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #10225 > unrolled thread

Creating custom VertexLabels

Started byAndre Koppel <akoppel@akso.de>
First post2012-05-27 08:42 +0000
Last post2012-05-27 08:42 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Creating custom VertexLabels Andre Koppel <akoppel@akso.de> - 2012-05-27 08:42 +0000

#10225 — Creating custom VertexLabels

FromAndre Koppel <akoppel@akso.de>
Date2012-05-27 08:42 +0000
SubjectCreating custom VertexLabels
Message-ID<jpspdv$hcv$1@smc.vnet.net>
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?

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web