Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

When using a GraphEdit to alter a graph, is there a way to make the edges straight from one vertex to another?

Thanks

Here is my code:

  GraphEdit[
 LayeredGraphPlot[{"C1.4.4" -> "T1.5.7", "1.23" -> "L1.5.4", 
   "P1.4.3" -> "C1.4.4", "P1.4.3" -> "C1.1.4", "P1.1.9" -> "P1.5.2", 
   "P1.1.9" -> "L1.5.3", "P1.5.2" -> "T1.5.7", "L1.5.3" -> "T1.5.7", 
   "L1.5.4" -> "T1.5.7", "P1.5.5" -> "T1.5.7", "L1.4.6" -> "L1.4.7", 
   "L1.4.8" -> "P1.4.20", "L1.4.8" -> "P1.4.19", "L1.5.6" -> "T1.5.7",
    "L1.4.8" -> "P1.4.9", "T1.5.7" -> "C1.5.8", "P1.4.9" -> "C1.4.10",
    "C1.5.8" -> "T1.5.9", "L1.1.15" -> "R1.4.11", 
   "P1.1.5" -> "R1.4.11", "P1.1.26" -> "P1.5.11", 
   "P1.1.26" -> "T1.5.9", "P1.2.14" -> "P1.4.12", 
   "P1.4.13" -> "P1.4.13", "T1.5.9" -> "R1.5.10", 
   "T1.5.9" -> "P1.5.11", "L1.4.14" -> "P1.5.2", 
   "C1.4.18" -> "P1.5.5", "C1.4.18" -> "R1.5.10", 
   "C1.4.18" -> "P1.5.5", "C1.4.18" -> "L1.5.6", "P1.4.5" -> "P1.4.5",
    "C1.4.17" -> "P1.4.20", "R1.5.12" -> "R1.5.11", 
   "D1.20" -> "P1.4.16", "L1.4.8" -> "P1.4.16", 
   "L1.4.14" -> "P1.4.16", "P1.2.11" -> "T1.5.9", 
   "R1.5.12" -> "C1.5.13", "1.5.11" -> "C1.5.13", 
   "P1.5.14" -> "C1.5.15", "T1.5.9" -> "T1.5.17", 
   "P1.5.14" -> "T1.5.17", "C1.5.15" -> "T1.5.17", 
   "P1.2.5" -> "P1.5.19", "P1.1.9" -> "P1.5.19", 
   "P1.1.11" -> "P1.5.19", "P1.1.12" -> "P1.5.19", 
   "T1.5.17" -> "P1.5.19", "P1.5.20" -> "P1.5.20", 
   "L1.5.21" -> "L1.5.23", "R1.5.24" -> "R1.5.27", 
   "L1.1.4" -> "L1.6.1", "L1.6.1" -> "C1.6.2", "R1.6.14" -> "R1.6.14",
    "P1.4.19" -> "P1.6.5", "P1.5.11" -> "P1.6.5", 
   "P1.5.25" -> "P1.6.5", "P1.4.19" -> "P1.6.7", 
   "P1.5.11" -> "P1.6.7", "P1.5.25" -> "P1.6.7", "P1.6.8" -> "P1.6.8",
    "P1.4.20" -> "P1.6.9", "P1.5.11" -> "P1.6.9", 
   "P1.5.25" -> "P1.6.9", "P1.6.10" -> "P1.6.10", 
   "L1.6.11" -> "L1.6.11", "P1.6.12" -> "C1.6.13", 
   "P1.6.6" -> "L1.6.14", "C1.4.4" -> "L1.6.14", 
   "P1.6.6" -> "L1.6.14", "C1.6.13" -> "L1.6.14", 
   "P1.4.9" -> "P1.6.16", "L1.6.14" -> "P1.6.16", 
   "L1.6.17" -> "P1.6.16", "L1.6.17" -> "P1.6.16", 
   "P1.6.16" -> "R1.6.18", "L1.6.14" -> "T1.6.19", 
   "P1.6.16" -> "T1.6.19", "L1.6.14" -> "T1.6.19", 
   "L1.6.1" -> "P1.6.20", "P1.6.6" -> "P1.6.20", 
   "C1.6.2" -> "P1.6.20", "L1.6.1" -> "C1.6.21", 
   "P1.6.20" -> "C1.6.21", "L1.6.1" -> "P1.6.22", 
   "P1.6.22" -> "C1.6.23", "L1.6.1" -> "C1.6.23", 
   "L1.6.1" -> "P1.6.24", "P1.6.9" -> "P1.6.24", 
   "P1.6.24" -> "C1.6.25", "L1.6.1" -> "C1.6.25", 
   "L1.6.1" -> "P1.6.26", "P1.6.26" -> "C1.627", 
   "L1.6.1" -> "C1.6.27", "T1.6.19" -> "P1.6.28", 
   "P1.6.12" -> "P1.6.28", "L1.6.30" -> "T1.6.29", 
   "C1.6.2" -> "L1.6.30", "T1.6.19" -> "L1.6.30", 
   "P1.4.20" -> "L1.6.30", "L1.6.17" -> "L1.6.30", 
   "P1.6.24" -> "L1.6.32", "L1.6.31" -> "L1.6.32", 
   "P1.6.24" -> "L1.6.32", "P1.4.9" -> "L1.6.32", 
   "P1.6.22" -> "L1.6.32", "T1.6.33" -> "C1.6.34", 
   "C1.6.34" -> "C1.6.35", "P1.6.20" -> "C1.6.35", 
   "P1.5.19" -> "P1.6.36", "P1.6.36" -> "P1.6.38", 
   "T1.5.9" -> "P1.6.38", "C1.6.21" -> "P1.6.38", 
   "P1.5.11" -> "P1.6.38", "T1.5.18" -> "P1.6.38", 
   "P1.6.40" -> "P1.6.39", "C1.6.25" -> "P1.6.40", 
   "P1.6.36" -> "P1.6.40", "C1.6.35" -> "P1.6.40", 
   "T1.3.1" -> "P1.6.42", "P1.6.36" -> "P1.6.43", 
   "P1.6.38" -> "P1.6.43", "P1.6.42" -> "P1.6.43", 
   "P1.6.41" -> "P1.6.43", "P1.6.40" -> "P1.6.44", 
   "P1.6.41" -> "P1.6.44", "P1.6.36" -> "P1.6.44", 
   "P1.4.15" -> "P1.6.46", "P1.5.19" -> "P1.6.46", 
   "P1.6.39" -> "P1.6.47", "P1.4.15" -> "P1.6.47", 
   "P1.5.19" -> "P1.6.47", "P1.2.14" -> "P1.6.47", 
   "P1.6.36" -> "P1.6.47", "R1.7.2" -> "R1.7.2", "P1.7.3" -> "P1.7.3",
    "C1.7.4" -> "C1.7.4", "P1.7.5" -> "P1.7.6", "P1.7.7" -> "P1.7.8", 
   "P1.1.17" -> "P1.7.10", "P1.7.10" -> "R1.7.11", 
   "P1.1.17" -> "P1.7.12", "P1.7.10" -> "P1.7.12", 
   "P1.7.12" -> "C1.7.13", "P1.7.10" -> "C1.7.13", 
   "C1.7.13" -> "C1.7.14", "L1.7.15" -> "P1.7.16", 
   "T1.7.17" -> "C1.7.18", "P1.7.7" -> "C.7.18", 
   "C1.7.18" -> "R1.7.19" }, VertexLabeling -> True, 
  PlotStyle -> {Arrowheads[{{0.008, 0.6}}]}, 
  PlotRangePadding -> Automatic]]

If I move a vertex, the edge becomes very irregular if it had any curvature in it. I would like to make edges straight without moving all the active points on an edge.

share|improve this question
    
Thanks R.M., I will edit my question to clarify. –  4o3i4h3o4 Jul 15 '12 at 5:15
    
Hi! Next time try to post the minimal possible amount of code that shows the desired (or undesired :) ) behavior –  belisarius Jul 16 '12 at 2:30

1 Answer 1

I think you are misunderstanding the function usage.

Try this:

Needs["GraphUtilities`"]
GraphEdit[{"C1.4.4" -> "T1.5.7" ...}]

It will open the edit window, where you can play with different options:

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.