Re: [graphviz-interest] layout control

George Georgalis <[email protected]> Tue, 23 Aug 2016 11:04:47 -0700
Newsgroups gmane.comp.video.graphviz
Message-ID <CAHK3FNzUQPpTf5wX37Wqu7nry4XtwNACZtVhV1LWxL+APZWoeg@mail.gmail.com>
--===============3248882621030393229==
Content-Type: multipart/alternative; boundary=001a114285ca1e6294053ac10014

--001a114285ca1e6294053ac10014
Content-Type: text/plain; charset=UTF-8

Thanks, the twopi -Groot=E1 was very helpful. Of course, the very first
change I wanted was to eliminate E1, but invisible works fine for that. (I
don't suppose there is an equivalent root function without a root node?)

My challenge is to graph alternate representations of a network, in both
hierarchical and matrix forms, while retaining the perception that it is
the same network. The (twopi) layout emphasizes inputs of higher scope,
while a matrix layout emphasizes peer (same scope) inputs.

A1 -> B1 -> C1 -> D1 -> A1t2 -> B1t2 -> C1t2 -> D1t2 -> A1t3 ...

The above is a time series, representing 2.25 cycles of the broadest scope
(a matrix row). I'm not very happy with the matrix representations. The
twopi graph works well, accept I would like to emphasize the concentric
inputs more, since that is the traditional barrier and the key point of the
illustration.



On Mon, Aug 15, 2016 at 7:18 AM, Emden R. Gansner <[email protected]> wrote:

> The simplest way to get the required node positions is to use
>
>   twopi -Groot=E1
>
> If you want the radial arms horizontal and vertical, you would have to do
> the rotation afterwards. Or you can remove the edges making the circles
> (via gvpr) , and layout the graph with
>
>   neato -Gstart=self -Goverlap=false
>
> You can also tweak in the input, replacing D3 -> E1 by the edge E1 -> D3
> [dir=back] placed at the top if the input and add -Gnormalize.
>
> gv doesn't support actual circular arcs; splines=curved might be
> acceptable. So, with the input gg.gv:
>
> digraph {
> { edge[on_circle=1]
>
> A1 -> B1 -> C1 -> D1 -> A1
> A2 -> B2 -> C2 -> D2 -> A2
> A3 -> B3 -> C3 -> D3 -> A3
> }
>
> A1 -> A2 -> A3 -> E1
> B1 -> B2 -> B3 -> E1
> C1 -> C2 -> C3 -> E1
> D1 -> D2 -> D3 -> E1
> }
>
> run
>
> twopi -Groot=E1 gg.gv | gvpr -c 'E[on_circle]{$.pos = "" }' | neato -n2
> -Gsplines=curved
>
> If you really want circles, a hack I have used in the past is to use the
> gvpr pass to add nodes with shape=circle,
> positioned at E1 with the appropriate radius.
>
>
> On 08/10/2016 02:44 PM, George Georgalis wrote:
>
> Belated thanks... that was useful, Emden.
>
> I have a similar challenge today, I'd like to render concentric networks
> in a gv, like the jpg attachment. The arrows pointing to the center are
> less important, regardless, the rendering problem has been non-concentric
> loops, and figure-eights where I expected circles.
>
> A1 -> B1 -> C1 -> D1 -> A1
> A2 -> B2 -> C2 -> D2 -> A2
> A3 -> B3 -> C3 -> D3 -> A3
> {rank=max A1 B1 C1 D1 }
>
> A1 -> A2 -> A3 -> E1
> B1 -> B2 -> B3 -> E1
> C1 -> C2 -> C3 -> E1
> D1 -> D2 -> D3 -> E1
> {rank=min E1}
>
> A neato rendering is also attached. If I remove the last 5 lines and use
> circo, I can get circles, but they are not concentric. Anyone have a
> suggestion for this graph?
>
> -George
>
>
> On Tue, Jun 28, 2011 at 2:02 PM, Emden R. Gansner <[email protected]>
> wrote:
>
>> On 6/28/11 4:59 PM, George Georgalis wrote:
>>
>>> What are you using for the straight edges?
>>>
>> splines=ortho
>>
>>     Emden
>>
>>
>
>
> --
> George Georgalis, (415) 894-2710, <http://www.galis.org/>
> http://www.galis.org/
>
>
> _______________________________________________graphviz-interest@lists.research.att.comhttp://lists.research.att.com/mailman/listinfo/graphviz-interest
>
>
>
> _______________________________________________
> [email protected]
> http://lists.research.att.com/mailman/listinfo/graphviz-interest
>
>


-- 
George Georgalis, (415) 894-2710, http://www.galis.org/

--001a114285ca1e6294053ac10014
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><div>Thanks, the twopi -Groot=3DE1 was very helpful. =
Of course, the very first change I wanted was to eliminate E1, but invisibl=
e works fine for that. (I don&#39;t suppose there is an equivalent root fun=
ction without a root node?)<br><br>My challenge is to graph alternate repre=
sentations of a network, in both hierarchical and matrix forms, while retai=
ning the perception that it is the same network. The (twopi) layout emphasi=
zes inputs of higher scope, while a matrix layout emphasizes peer (same sco=
pe) inputs.<br><br></div>A1 -&gt; B1 -&gt; C1 -&gt; D1 -&gt; A1t2 -&gt; B1t=
2 -&gt; C1t2 -&gt; D1t2 -&gt; A1t3 ...<br><br></div>The above is a time ser=
ies, representing 2.25 cycles of the broadest scope (a matrix row). I&#39;m=
 not very happy with the matrix representations. The twopi graph works well=
, accept I would like to emphasize the concentric inputs more, since that i=
s the traditional barrier and the key point of the illustration. <br><br><b=
r></div><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">On Mon, A=
ug 15, 2016 at 7:18 AM, Emden R. Gansner <span dir=3D"ltr">&lt;<a href=3D"m=
ailto:[email protected]" target=3D"_blank">[email protected]</a>&gt;</span> wro=
te:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-=
left:1px #ccc solid;padding-left:1ex">
 =20
   =20
 =20
  <div bgcolor=3D"#FFFFFF" text=3D"#000000">
    The simplest way to get the required node positions is to use<br>
    <br>
    =C2=A0 twopi -Groot=3DE1<br>
    <br>
    If you want the radial arms horizontal and vertical, you would have
    to do the rotation afterwards. Or you can remove the edges making
    the circles (via gvpr) , and layout the graph with<br>
    <br>
    =C2=A0 neato -Gstart=3Dself -Goverlap=3Dfalse<br>
    <br>
    You can also tweak in the input, replacing D3 -&gt; E1 by the edge
    E1 -&gt; D3 [dir=3Dback] placed at the top if the input and add
    -Gnormalize.<br>
    <br>
    gv doesn&#39;t support actual circular arcs; splines=3Dcurved might be
    acceptable. So, with the input gg.gv:<br>
    <br>
    digraph {<br>
    { edge[on_circle=3D1]<span class=3D""><br>
    <br>
    A1 -&gt; B1 -&gt; C1 -&gt; D1 -&gt; A1<br>
    A2 -&gt; B2 -&gt; C2 -&gt; D2 -&gt; A2<br>
    A3 -&gt; B3 -&gt; C3 -&gt; D3 -&gt; A3<br>
    }<br>
    <br></span><span class=3D"">
    A1 -&gt; A2 -&gt; A3 -&gt; E1<br>
    B1 -&gt; B2 -&gt; B3 -&gt; E1<br>
    C1 -&gt; C2 -&gt; C3 -&gt; E1<br>
    D1 -&gt; D2 -&gt; D3 -&gt; E1<br>
    }<br>
    <br></span>
    run<br>
    <br>
    twopi -Groot=3DE1 gg.gv | gvpr -c &#39;E[on_circle]{$.pos =3D &quot;&qu=
ot; }&#39; | neato
    -n2 -Gsplines=3Dcurved<br>
    =C2=A0<br>
    If you really want circles, a hack I have used in the past is to use
    the gvpr pass to add nodes with shape=3Dcircle,<br>
    positioned at E1 with the appropriate radius.<div><div class=3D"h5"><br=
>
    <br>
    <div>On 08/10/2016 02:44 PM, George
      Georgalis wrote:<br>
    </div>
    </div></div><blockquote type=3D"cite"><div><div class=3D"h5">
      <div dir=3D"ltr">
        <div>
          <div>
            <div>Belated thanks... that was useful, Emden.<br>
              <br>
            </div>
            I have a similar challenge today, I&#39;d like to render
            concentric networks in a gv, like the jpg attachment. The
            arrows pointing to the center are less important,
            regardless, the rendering problem has been non-concentric
            loops, and figure-eights where I expected circles.<br>
            <br>
            A1 -&gt; B1 -&gt; C1 -&gt; D1 -&gt; A1<br>
            A2 -&gt; B2 -&gt; C2 -&gt; D2 -&gt; A2<br>
            A3 -&gt; B3 -&gt; C3 -&gt; D3 -&gt; A3<br>
            {rank=3Dmax A1 B1 C1 D1 }<br>
            <br>
            A1 -&gt; A2 -&gt; A3 -&gt; E1<br>
            B1 -&gt; B2 -&gt; B3 -&gt; E1<br>
            C1 -&gt; C2 -&gt; C3 -&gt; E1<br>
            D1 -&gt; D2 -&gt; D3 -&gt; E1<br>
            {rank=3Dmin E1}<br>
            <br>
          </div>
          A neato rendering is also attached. If I remove the last 5
          lines and use circo, I can get circles, but they are not
          concentric. Anyone have a suggestion for this graph?<br>
          <br>
        </div>
        -George<br>
        <div>
          <div>
            <div><br>
            </div>
          </div>
        </div>
      </div>
      <div class=3D"gmail_extra"><br>
        <div class=3D"gmail_quote">On Tue, Jun 28, 2011 at 2:02 PM, Emden
          R. Gansner <span dir=3D"ltr">&lt;<a href=3D"mailto:[email protected]=
tt.com" target=3D"_blank">[email protected]</a>&gt;</span>
          wrote:<br>
          <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;bord=
er-left:1px #ccc solid;padding-left:1ex"><span>On 6/28/11 4:59 PM, George G=
eorgalis wrote:<br>
              <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;=
border-left:1px #ccc solid;padding-left:1ex">
                What are you using for the straight edges?<br>
              </blockquote>
            </span>
            splines=3Dortho<span><font color=3D"#888888"><br>
                <br>
                =C2=A0 =C2=A0 Emden<br>
                <br>
              </font></span></blockquote>
        </div>
        <br>
        <br clear=3D"all">
        <br>
        -- <br>
        <div data-smartmail=3D"gmail_signature">
          <div dir=3D"ltr">
            <div>George Georgalis, <a href=3D"tel:%28415%29%20894-2710" val=
ue=3D"+14158942710" target=3D"_blank">(415) 894-2710</a>, <a href=3D"http:/=
/www.galis.org/" target=3D"_blank"></a><a href=3D"http://www.galis.org/" ta=
rget=3D"_blank">http://www.galis.org/</a></div>
          </div>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      </div></div><pre>______________________________<wbr>_________________
<a href=3D"mailto:[email protected]" target=3D"_blan=
k">graphviz-interest@lists.<wbr>research.att.com</a>
<a href=3D"http://lists.research.att.com/mailman/listinfo/graphviz-interest=
" target=3D"_blank">http://lists.research.att.com/<wbr>mailman/listinfo/gra=
phviz-<wbr>interest</a>
</pre>
    </blockquote>
    <br>
  </div>

<br>______________________________<wbr>_________________<br>
<a href=3D"mailto:[email protected]">graphviz-intere=
st@lists.<wbr>research.att.com</a><br>
<a href=3D"http://lists.research.att.com/mailman/listinfo/graphviz-interest=
" rel=3D"noreferrer" target=3D"_blank">http://lists.research.att.com/<wbr>m=
ailman/listinfo/graphviz-<wbr>interest</a><br>
<br></blockquote></div><br><br clear=3D"all"><br>-- <br><div class=3D"gmail=
_signature" data-smartmail=3D"gmail_signature"><div dir=3D"ltr"><div>George=
 Georgalis, (415) 894-2710, <a href=3D"http://www.galis.org/" target=3D"_bl=
ank">http://www.galis.org/</a></div></div></div>
</div>

--001a114285ca1e6294053ac10014--

--===============3248882621030393229==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
[email protected]
http://lists.research.att.com/mailman/listinfo/graphviz-interest

--===============3248882621030393229==--