Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

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

Search the Archive

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 -&gt; {1400},</di=
v><div>Method -&gt; &quot;SpringEmbedding&quot;,</div><div><br></div><div>T=
his is not completely satisfactory, but the labels don&#39;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 &quot;just right.&quot; Other=
 values for Method (such as &quot;SpringElectricalEmbedding&quot;) 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">&lt;<a href="mailto:muhammad.abuzai=
d at gmail.com" target="_blank">muhammad.abuzaid at gmail.com</a>&gt;</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, &quot;S=
hape<br>
of flood front&quot; and &quot;Current owc &amp; flood front&quot; 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&#39;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&#39;t over-lap...b=
ut<br>
it ends up wasting too much &#39;screen&#39; real-estate and looking silly<=
br>
2. Tried using the Thickness[] and Thick options but couldn&#39;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[{&quot;Current owc &amp; flood front&quot;-&gt;&quot;Oil presence=
 by layer&quot;,&quot;Current<br>
owc &amp; flood front&quot;-&gt;&quot;WCUT&quot;,&quot;Injection distributi=
on&quot;-&gt;&quot;Shape of flood<br>
front&quot;,&quot;Oil presence by layer&quot;-&gt;&quot;Location of remaini=
ng<br>
oil&quot;,&quot;Pdifferential&quot;-&gt;&quot;Shape of flood front&quot;,&q=
uot;Shape of flood<br>
front&quot;-&gt;&quot;Current owc &amp; flood front&quot;,&quot;Sor&quot;-&=
gt;&quot;Oil presence by<br>
layer&quot;,&quot;Sor&quot;-&gt;&quot;Sr&quot;,&quot;Coning&quot;-&gt;&quot=
;Shape of flood front&quot;,&quot;Geological<br>
variations&quot;-&gt;&quot;Sand presence by layer&quot;,&quot;Geological va=
riations&quot;-&gt;&quot;Rock<br>
type&quot;,&quot;Relative permeability&quot;-&gt;&quot;Shape of flood front=
&quot;,&quot;Rock<br>
type&quot;-&gt;&quot;Sor&quot;,&quot;Rock type&quot;-&gt;&quot;Rock quality=
&quot;,&quot;Aquifer strength&quot;-&gt;&quot;Current owc &amp;<br>
flood front&quot;,&quot;Measurement uncertainty&quot;-&gt;&quot;Injection d=
istribution&quot;,&quot;Shale<br>
length continuity&quot;-&gt;&quot;Current owc &amp; flood<br>
front&quot;},VertexLabeling-&gt;All,EdgeRenderingFunction-&gt;({Arrowheads[=
.02],Arrow[Line[#1,VertexColors-&gt;{Red,Black}],0.2]}&amp;)]<br>
<br>
<br>
<br>
<br>
Thanks<br>
<br>
<br>
</blockquote></div><br></div></div>

--0015173fec10d9129e04c4961772--



  • Prev by Date: Re: Sending an interrupt to the frontend?
  • Next by Date: Re: Algorithm Analysis Course: Should I use Mathematica for projects?
  • Previous by thread: Is there a way to stop the vertex labels from over-lapping?
  • Next by thread: Algorithm Analysis Course: Should I use Mathematica for projects?