Quantcast

vertical orientation for graphs?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

vertical orientation for graphs?

Dmitry Lizorkin
Hello!

I am a newbie for Graphviz, so excuse me if i'm missing something obvious.
It looks like the dot utility tends to use primarily the horizontal
dimension when performing the graph layout (i.e. larger graphs obtain
increasing width, but essentially fixed height). How could the dot utility
be requested to use primarily-vertical orientation for the layout
alternatively (e.g. as if with the 90-degree rotation, but with labels not
rotated)?

Thanks in advance
Dmitry

_______________________________________________
[hidden email]
https://mailman.research.att.com/mailman/listinfo/graphviz-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: vertical orientation for graphs?

Emden R. Gansner
Dmitry Lizorkin wrote:
> It looks like the dot utility tends to use primarily the horizontal
> dimension when performing the graph layout (i.e. larger graphs obtain
> increasing width, but essentially fixed height). How could the dot
> utility be requested to use primarily-vertical orientation for the
> layout alternatively (e.g. as if with the 90-degree rotation, but with
> labels not rotated)?
>

I believe you want

   rankdir=LR

in the graph. See http://www.graphviz.org/doc/info/attrs.html#d:rankdir.

    Emden

_______________________________________________
[hidden email]
https://mailman.research.att.com/mailman/listinfo/graphviz-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: vertical orientation for graphs?

Dmitry Lizorkin
> I believe you want
>
>   rankdir=LR

Emden, thank you for pointing this out, i wasn't aware of the attribute.

Although the attribute you suggested produces a different layout, it often
has a tendency of being horizontally-stretched anyway. For example, below
are the two layouts generated for the same small graph:
rankdir=LR :
http://modis.ispras.ru/Lizorkin/Tmp/1-lr.png
rankdir=TB :
http://modis.ispras.ru/Lizorkin/Tmp/1-tb.png
While the two layouts are clearly quite different, both result to graph
width considerably larger than graph height.

Is it possible to encourage the dot utility to place more nodes over the
vertical axis (maybe by enforcing some kind of width-penalty)?

Best regards,
Dmitry

_______________________________________________
[hidden email]
https://mailman.research.att.com/mailman/listinfo/graphviz-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: vertical orientation for graphs?

Emden R. Gansner
Dmitry Lizorkin wrote:

>
> Although the attribute you suggested produces a different layout, it
> often has a tendency of being horizontally-stretched anyway. For
> example, below are the two layouts generated for the same small graph:
> rankdir=LR :
> http://modis.ispras.ru/Lizorkin/Tmp/1-lr.png
> rankdir=TB :
> http://modis.ispras.ru/Lizorkin/Tmp/1-tb.png
> While the two layouts are clearly quite different, both result to
> graph width considerably larger than graph height.
>
> Is it possible to encourage the dot utility to place more nodes over
> the vertical axis (maybe by enforcing some kind of width-penalty)?
>
Use the aspect attribute
http://www.graphviz.org/doc/info/attrs.html#d:aspect.

You would also find it helpful to break some of your labels into
multiple lines.

    Emden

_______________________________________________
[hidden email]
https://mailman.research.att.com/mailman/listinfo/graphviz-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: vertical orientation for graphs?

Dmitry Lizorkin
> Use the aspect attribute

Yes, that was the kind of thing i was looking for. Thank you for your help
and for your patience.

Dmitry

_______________________________________________
[hidden email]
https://mailman.research.att.com/mailman/listinfo/graphviz-interest
Loading...