Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

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

Search the Archive

Re: issues with GraphPlot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg99262] Re: issues with GraphPlot
  • From: ADL <alberto.dilullo at tiscali.it>
  • Date: Fri, 1 May 2009 05:22:59 -0400 (EDT)
  • References: <gsuisc$drq$1@smc.vnet.net> <gt0s27$ec8$1@smc.vnet.net>

On my version (7.0 for Microsoft Windows (32-bit) (February 18,
2009)), the code proposed by Sjoerd produces an upside-down upper
label. This can be better seen with:

GraphPlot[{{"B" -> "A", "BA"}, {"A" -> "B", "AB"}},
 DirectedEdges -> True,
 VertexLabeling -> True,
 VertexRenderingFunction -> ({White, EdgeForm[Black], Disk[#, .05],
     Black, Text[#2, #1]} &),
 EdgeLabeling -> True,
 EdgeRenderingFunction -> (
   {Inset[
      Text[Style[#3, 18]],
      Mean[#1],
      Center,
      Automatic,
      First[#1] - Last[#1]
      ],
     Arrowheads[Large],
     Arrow[#1, 0.07]
     } &),
 PlotStyle -> Thickness[0.005]
 ]

In this way, it is may be useful only with mirror-invariant labels,
like (+), (-), etc.

I do not know how to adjust this.

ADL


On Apr 30, 12:19 pm, "Sjoerd C. de Vries" <sjoerd.c.devr... at gmail.com>
wrote:
> Hi Sean,
>
> below is the complete code for the label. Read the Inset doc page for
> more details on the parameters I used.
>
> Cheers -- Sjoerd
>
> GraphPlot[{{"B" -> "A", "+"}, {"A" -> "B", "+"}},
>  DirectedEdges -> True, VertexLabeling -> True,
>  VertexRenderingFunction -> ({White, EdgeForm[Black], Disk[#, .05],
>      Black, Text[#2, #1]} &), EdgeLabeling -> True,
>  EdgeRenderingFunction -> ({Inset[Text[Style[#3, 16]], Mean[#1], Top,
>       Automatic, First[#1] - Last[#1]], Arrowheads[Medium],
>      Arrow[#1, 0.07]} &), PlotStyle -> Thickness[0.005]]
>


  • Prev by Date: Re: New Wolfram Tutorial Collection documentation is ready
  • Next by Date: Re: New Wolfram Tutorial Collection documentation is ready
  • Previous by thread: Re: mathematica newbie trouble
  • Next by thread: Re: issues with GraphPlot