MathGroup Archive 2009

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

Search the Archive

Re: issues with GraphPlot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg99207] Re: issues with GraphPlot
  • From: sean_incali at yahoo.com
  • Date: Wed, 29 Apr 2009 06:42:26 -0400 (EDT)
  • References: <gsuisc$drq$1@smc.vnet.net> <gt0s27$ec8$1@smc.vnet.net>

Nevermind, I figured it out.

Now another strange issue.

Compare the following two codes and look at the location of the edges
for the top edge.

GraphPlot[{{"B" -> "A", "( c2 + )"}, {"A" -> "B", "( c1 + )"}},
 DirectedEdges -> True, VertexLabeling -> True,
 VertexRenderingFunction -> ({White, EdgeForm[Black], Disk[#, .05],
     Black, Text[#2, #1]} &), EdgeLabeling -> True,
 EdgeRenderingFunction -> ({Arrowheads[Medium], Arrow[#1, 0.1],
     Inset[Text[#3], Mean[#1], Background -> White]} &),
 PlotStyle -> Thickness[0.005]]

GraphPlot[{{"B" -> "A", "( c2 + )"}, {"A" -> "B", "( c1 + )"}},
 DirectedEdges -> True, VertexLabeling -> True,
 VertexRenderingFunction -> ({White, EdgeForm[Black], Disk[#, .05],
     Black, Text[#2, #1]} &), EdgeLabeling -> True,
 PlotStyle -> Thickness[0.005]]


What expains the lowering of the top label in the top code?



On Apr 27, 2:24 am, sean_inc... at yahoo.com wrote:
> Where would the Inset line go?
>
> On Apr 25, 10:39 pm, "Sjoerd C. de Vries" <sjoerd.c.devr... at gmail.com>
> wrote:
>
> > For the label: this is something hat the EdgeRenderingFunction should
> > do. Insert something like Inset[Text[#3], Mean[#1]] in what you
> > already have.
>
> > Cheers -- Sjoerd
>
> > On Apr 25, 10:50 am, sean_inc... at yahoo.com wrote:
>
> > > Hello group,
>
> > > A few things that I just can't figure out.
>
> > > 1. EdgeRenderingFunction ignores edge labels.
>
> > > GraphPlot[{{"B" -> "A" , "+"}, {"A" -> "B", "+"}},
> > >  DirectedEdges -> True, VertexLabeling -> True,
> > >  VertexRenderingFunction -> ({White, EdgeForm[Black], Disk[#, .05],
> > >      Black, Text[#2, #1]} &), EdgeLabeling -> True,
> > >  EdgeRenderingFunction -> ({ Arrowheads[Medium],
> > >      Arrow[#1 , 0.07]} &), PlotStyle -> Thickness[0.005]]
>
> > > 2. As it is, above code produces a graph that is stretched
> > > horizontally a bit too much. About the half the horizontal width work=
s
> > > better for me. How do I accomplish that? AspectRatio-> 1/GoldenRatio
> > > doesn't work since disk gets stretch also.
>
> > > 3. For node A to appear on the left, "B"-> "A" has to be defined
> > > first. If I reverse it, then the node B will appear on the left. What
> > > is the reason for this?
>
> > > Thanks in advance for any info.
>
> > > Sean



  • Prev by Date: Re: Mathematica crashed -- where did my notebook go?
  • Next by Date: Re: ZigZag matrix rearrange
  • Previous by thread: Re: issues with GraphPlot
  • Next by thread: Re: issues with GraphPlot