MathGroup Archive 2009

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

Search the Archive

LayeredGraphPlot Question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg105456] LayeredGraphPlot Question
  • From: Michael Greene <mgreene at csumb.edu>
  • Date: Thu, 3 Dec 2009 06:15:30 -0500 (EST)

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



  • Prev by Date: Re: Re: Simple Spreadsheet within Mathematica?
  • Next by Date: Integrating with HypergeometricU
  • Previous by thread: Re: 3D Model of a Bitmap
  • Next by thread: Re: LayeredGraphPlot Question