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


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

Creating custom VertexLabels

From Andre Koppel <akoppel@akso.de>
Newsgroups comp.soft-sys.math.mathematica
Subject Creating custom VertexLabels
Date 2012-05-27 08:42 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jpspdv$hcv$1@smc.vnet.net> (permalink)

Show all headers | View raw


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?

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

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

csiph-web