Re: [graphviz-interest] layout control
"Emden R. Gansner" <[email protected]> Mon, 15 Aug 2016 10:18:57 -0400
| Newsgroups | gmane.comp.video.graphviz |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--===============2986708045160575749==
Content-Type: multipart/alternative;
boundary="------------070103060500040409030305"
This is a multi-part message in MIME format.
--------------070103060500040409030305
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit
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] <mailto:[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/
>
>
> _______________________________________________
> [email protected]
> http://lists.research.att.com/mailman/listinfo/graphviz-interest
--------------070103060500040409030305
Content-Type: text/html; charset=windows-1252
Content-Transfer-Encoding: 8bit
<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
The simplest way to get the required node positions is to use<br>
<br>
twopi -Groot=E1<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>
neato -Gstart=self -Goverlap=false<br>
<br>
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.<br>
<br>
gv doesn't support actual circular arcs; splines=curved might be
acceptable. So, with the input gg.gv:<br>
<br>
digraph {<br>
{ edge[on_circle=1]<br>
<br>
A1 -> B1 -> C1 -> D1 -> A1<br>
A2 -> B2 -> C2 -> D2 -> A2<br>
A3 -> B3 -> C3 -> D3 -> A3<br>
}<br>
<br>
A1 -> A2 -> A3 -> E1<br>
B1 -> B2 -> B3 -> E1<br>
C1 -> C2 -> C3 -> E1<br>
D1 -> D2 -> D3 -> E1<br>
}<br>
<br>
run<br>
<br>
twopi -Groot=E1 gg.gv | gvpr -c 'E[on_circle]{$.pos = "" }' | neato
-n2 -Gsplines=curved<br>
<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=circle,<br>
positioned at E1 with the appropriate radius.<br>
<br>
<div class="moz-cite-prefix">On 08/10/2016 02:44 PM, George
Georgalis wrote:<br>
</div>
<blockquote
cite="mid:CAHK3FNx_R2xEwQhxdNNfyr0Emrjwazy5RpB1UsN=UpV8_W1ZmQ@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div>
<div>Belated thanks... that was useful, Emden.<br>
<br>
</div>
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.<br>
<br>
A1 -> B1 -> C1 -> D1 -> A1<br>
A2 -> B2 -> C2 -> D2 -> A2<br>
A3 -> B3 -> C3 -> D3 -> A3<br>
{rank=max A1 B1 C1 D1 }<br>
<br>
A1 -> A2 -> A3 -> E1<br>
B1 -> B2 -> B3 -> E1<br>
C1 -> C2 -> C3 -> E1<br>
D1 -> D2 -> D3 -> E1<br>
{rank=min 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="gmail_extra"><br>
<div class="gmail_quote">On Tue, Jun 28, 2011 at 2:02 PM, Emden
R. Gansner <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:[email protected]" target="_blank">[email protected]</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex"><span
class="">On 6/28/11 4:59 PM, George Georgalis wrote:<br>
<blockquote class="gmail_quote" style="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=ortho<span class="HOEnZb"><font color="#888888"><br>
<br>
Emden<br>
<br>
</font></span></blockquote>
</div>
<br>
<br clear="all">
<br>
-- <br>
<div class="gmail_signature" data-smartmail="gmail_signature">
<div dir="ltr">
<div>George Georgalis, (415) 894-2710, <a
moz-do-not-send="true" href="http://www.galis.org/"
target="_blank"><a class="moz-txt-link-freetext" href="http://www.galis.org/">http://www.galis.org/</a></a></div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
<a class="moz-txt-link-abbreviated" href="mailto:[email protected]">[email protected]</a>
<a class="moz-txt-link-freetext" href="http://lists.research.att.com/mailman/listinfo/graphviz-interest">http://lists.research.att.com/mailman/listinfo/graphviz-interest</a>
</pre>
</blockquote>
<br>
</body>
</html>
--------------070103060500040409030305--
--===============2986708045160575749==
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
--===============2986708045160575749==--