Re: Is there a way to stop the vertex labels from over-lapping?
- To: mathgroup at smc.vnet.net
- Subject: [mg127266] Re: Is there a way to stop the vertex labels from over-lapping?
- From: James Stein <mathgroup at stein.org>
- Date: Thu, 12 Jul 2012 04:57:45 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- Delivered-to: mathgroup-newout@smc.vnet.net
- Delivered-to: mathgroup-newsend@smc.vnet.net
- References: <20120711222231.F0F2D6848@smc.vnet.net>
You might consider added these two options: ImageSize -> {1400}, Method -> "SpringEmbedding", This is not completely satisfactory, but the labels don't overlap. All but one arrow head is at least partly visible. Some isolated portions of the graph have only two vertexes with one edge. Curiously, these portions are rendered differently in an apparent attempt to maintain identical spacing between two vertexes, the arrow-edge aesthetics are sacrificed: sometimes the arrow is too short to connect the boxes; sometimes too long and and partly obscured, and sometimes are "just right." Other values for Method (such as "SpringElectricalEmbedding") give somewhat different layouts. On Wed, Jul 11, 2012 at 3:22 PM, Muhammad Abuzaid < muhammad.abuzaid at gmail.com> wrote: > > Wondering whether someone can help me with the following two issues: > > 1. Is there a way to stop the vertex labels from over-lapping? (eg, "Shape > of flood front" and "Current owc & flood front" boxes over-lap) > 2. Is there a way to make the lines (arrows) thicker ? > 3. Is there a way to avoid the arrows being covered by the labels/boxes? > > Things I've tried so far: > 1.a. Tried explicitly choosing the coordinates of the plot (very manual > process, invloving exporting and importing in excel) > 1.b. Tried expanding the graphics so thet the labels don't over-lap...but > it ends up wasting too much 'screen' real-estate and looking silly > 2. Tried using the Thickness[] and Thick options but couldn't get it to > work here > 3. Tried the setback parameter of the Arrow[] function, but if its too > small, the arrow is sometimes covered by the label...if its too big, the > arrowhead is too far from the target > > I also thought the ImagePadding function/option/directive could be used but > could figure out how... > > Mathematica code below: > > GraphPlot[{"Current owc & flood front"->"Oil presence by layer","Current > owc & flood front"->"WCUT","Injection distribution"->"Shape of flood > front","Oil presence by layer"->"Location of remaining > oil","Pdifferential"->"Shape of flood front","Shape of flood > front"->"Current owc & flood front","Sor"->"Oil presence by > layer","Sor"->"Sr","Coning"->"Shape of flood front","Geological > variations"->"Sand presence by layer","Geological variations"->"Rock > type","Relative permeability"->"Shape of flood front","Rock > type"->"Sor","Rock type"->"Rock quality","Aquifer strength"->"Current owc & > flood front","Measurement uncertainty"->"Injection distribution","Shale > length continuity"->"Current owc & flood > > front"},VertexLabeling->All,EdgeRenderingFunction->({Arrowheads[.02],Arrow[Line[#1,VertexColors->{Red,Black}],0.2]}&)] > > > > > Thanks > > > --0015173fec10d9129e04c4961772 Content-Type: text/html; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable X-Sun-Content-Length: 3720 You might consider added these two options:<div>ImageSize -> {1400},</di= v><div>Method -> "SpringEmbedding",</div><div><br></div><div>T= his is not completely satisfactory, but the labels don't overlap. All= but one arrow head is at least partly visible. Some isolated portions of= the graph have only two vertexes with one edge. Curiously, these portion= s are rendered differently in an apparent attempt to maintain identical s= pacing between two vertexes, the arrow-edge aesthetics are sacrificed: so= metimes the arrow is too short to connect the boxes; sometimes too long a= nd and partly obscured, and sometimes are "just right." Other= values for Method (such as "SpringElectricalEmbedding") give s= omewhat different layouts.</div> <div><br><div><br><div class="gmail_quote">On Wed, Jul 11, 2012 at 3:22 P= M, Muhammad Abuzaid <span dir="ltr"><<a href="mailto:muhammad.abuzai= d at gmail.com" target="_blank">muhammad.abuzaid at gmail.com</a>></span> wr= ote:<br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex"><br> Wondering whether someone can help me with the following two issues:<br> <br> 1. Is there a way to stop the vertex labels from over-lapping? (eg, "S= hape<br> of flood front" and "Current owc & flood front" boxes ov= er-lap)<br> 2. Is there a way to make the lines (arrows) thicker ?<br> 3. Is there a way to avoid the arrows being covered by the labels/boxes?<br= > <br> Things I've tried so far:<br> 1.a. Tried explicitly choosing the coordinates of the plot (very manual<br> process, invloving exporting and importing in excel)<br> 1.b. Tried expanding the graphics so thet the labels don't over-lap...b= ut<br> it ends up wasting too much 'screen' real-estate and looking silly<= br> 2. Tried using the Thickness[] and Thick options but couldn't get it to= <br> work here<br> 3. Tried the setback parameter of the Arrow[] function, but if its too<br> small, the arrow is sometimes covered by the label...if its too big, the<br= > arrowhead is too far from the target<br> <br> I also thought the ImagePadding function/option/directive could be used but= <br> could figure out how...<br> <br> Mathematica code below:<br> <br> GraphPlot[{"Current owc & flood front"->"Oil presence= by layer","Current<br> owc & flood front"->"WCUT","Injection distributi= on"->"Shape of flood<br> front","Oil presence by layer"->"Location of remaini= ng<br> oil","Pdifferential"->"Shape of flood front",&q= uot;Shape of flood<br> front"->"Current owc & flood front","Sor"-&= gt;"Oil presence by<br> layer","Sor"->"Sr","Coning"->"= ;Shape of flood front","Geological<br> variations"->"Sand presence by layer","Geological va= riations"->"Rock<br> type","Relative permeability"->"Shape of flood front= ","Rock<br> type"->"Sor","Rock type"->"Rock quality= ","Aquifer strength"->"Current owc &<br> flood front","Measurement uncertainty"->"Injection d= istribution","Shale<br> length continuity"->"Current owc & flood<br> front"},VertexLabeling->All,EdgeRenderingFunction->({Arrowheads[= .02],Arrow[Line[#1,VertexColors->{Red,Black}],0.2]}&)]<br> <br> <br> <br> <br> Thanks<br> <br> <br> </blockquote></div><br></div></div> --0015173fec10d9129e04c4961772--
- References:
- Is there a way to stop the vertex labels from over-lapping?
- From: Muhammad Abuzaid <muhammad.abuzaid@gmail.com>
- Is there a way to stop the vertex labels from over-lapping?