MathGroup Archive 2009

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

Search the Archive

Re: LayeredGraphPlot Question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg105462] Re: LayeredGraphPlot Question
  • From: dh <dh at metrohm.com>
  • Date: Fri, 4 Dec 2009 04:30:17 -0500 (EST)
  • References: <hf86ll$176$1@smc.vnet.net>


Michael Greene wrote:

> I'm documenting a process flow and thought I'd try my hand at using M to

> draw the flow diagram. After a bit of jiggling, I arrived at the following:

> 

> sz = 550; t[tx_] = Text[Style[tx, FontSize -> 14]];

> LayeredGraphPlot[{

>   {Applicant -> Student, t["Accepted &

>     Matriculates"]},

>   {Student -> CMS Only, t["Graduates:

>     Declines

>     Alumni"]},

>    {Student -> Alumni, t["Joins

>     Alumni

>     Assoc."]},

>   {Student -> Inactive, t["Drops or

>     is Dismissed"]},

>   {Applicant -> Inactive, t["Denied or Declines"]},

>   {CMS Only -> Inactive, t["6 Month Transcript Access

>     Period Elapses"]}},

>   VertexLabeling -> True, ImageSize -> {sz, sz}]

> 

> I had to do some size jiggering to get labels to not step on each other,

> hence the parametric sizing. The graph showed up in a meeting yesterday and

> as par for a meeting, someone wanted some changes made to the graph. I

> started to implement the changes when the colliding labels problem

> resurfaced.

> 

> I modified the above by rewording one label and adding another - to wit:

> 

> sz = 550; t[tx_] = Text[Style[tx, FontSize -> 14]];

> LayeredGraphPlot[{

>   {Applicant -> Student, t["Accepted &

>     Matriculates"]},

>   {Student -> CMS Only, t["Graduates:

>     Declines

>     Alumni"]},

>    {Student -> Alumni, t["Joins

>     Alumni

>     Assoc."]},

>   {Student -> Inactive, t["Drops or

>     is Dismissed"]},

>   {Applicant -> Inactive, t["Denied Admission"]},

>   {Applicant -> Inactive, t["Doesn't Enroll"]},

>   {CMS Only -> Inactive, t["6 Month Transcript Access

>     Period Elapses"]}},

>   VertexLabeling -> True, ImageSize -> {sz, sz}]

> 

> How can I modify the Denied Admission and Doesn't Enroll labels so they

> don't collide without hard coding the label vertices? Is there some way to

> nudge labels up/down or left/right without knowing where they are in the

> graph?

> 

> Thanks,

> Michael

> 

> 

Hi Michael,

you may e.g. use the option MultiedgeStyle :



sz = 550; t[tx_] = Text[Style[tx, FontSize -> 14]];

LayeredGraphPlot[{{Applicant -> Student, t["Accepted &

         Matriculates"]}, {Student -> CMS Only, t["Graduates:

         Declines

         Alumni"]}, {Student -> Alumni, t["Joins

         Alumni

         Assoc."]}, {Student -> Inactive, t["Drops or

         is Dismissed"]}, {Applicant -> Inactive,

    t["Denied Admission"]}, {Applicant -> Inactive,

    t["Doesn't Enroll"]}, {CMS Only -> Inactive,

    t["6 Month Transcript Access

         Period Elapses"]}}, VertexLabeling -> True,

  ImageSize -> {sz, sz}, MultiedgeStyle -> .45]



Daniel




  • Prev by Date: Re: How to make large graphics object fit within a plot?
  • Next by Date: Re: How to make large graphics object fit within a plot?
  • Previous by thread: LayeredGraphPlot Question
  • Next by thread: Re: LayeredGraphPlot Question