Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 676255
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T00:54:28+00:00 2026-05-14T00:54:28+00:00

I am trying to draw a graph showing search prefixes using twopi. I have

  • 0

I am trying to draw a graph showing search prefixes using twopi. I have a simple input file and am getting this output:

alt text http://www.freeimagehosting.net/uploads/th.ac6cd51528.png
(full image)

Here is the input file:

digraph search {

// ordering=out;
// color=blue;
// rank=same;
// overlap=scale;
 rankdir=LR;
 root=root;
 ranksep=1.25;
 overlap=true;

"root";

a [color=none,fontsize=12];
b [color=none,fontsize=12];
c [color=none,fontsize=12];
d [color=none,fontsize=12];
e [color=none,fontsize=12];
f [color=none,fontsize=12];
#g [color=none,fontsize=12];
h [color=none,fontsize=12];
i [color=none,fontsize=12];
j [color=none,fontsize=12];
k [color=none,fontsize=12];
l [color=none,fontsize=12];
m [color=none,fontsize=12];
n [color=none,fontsize=12];
o [color=none,fontsize=12];
p [color=none,fontsize=12];
q [color=none,fontsize=12];
r [color=none,fontsize=12];
s [color=none,fontsize=12];
t [color=none,fontsize=12];
u [color=none,fontsize=12];
v [color=none,fontsize=12];
w [color=none,fontsize=12];
x [color=none,fontsize=12];
y [color=none,fontsize=12];

#ga [color=none,fontsize=12];
gb [color=none,fontsize=12];
gc [color=none,fontsize=12];
gd [color=none,fontsize=12];
ge [color=none,fontsize=12];
gf [color=none,fontsize=12];
gg [color=none,fontsize=12];
gh [color=none,fontsize=12];
gi [color=none,fontsize=12];
gj [color=none,fontsize=12];
gk [color=none,fontsize=12];
gl [color=none,fontsize=12];
gm [color=none,fontsize=12];
gn [color=none,fontsize=12];
go [color=none,fontsize=12];
gp [color=none,fontsize=12];
gq [color=none,fontsize=12];
gr [color=none,fontsize=12];
gs [color=none,fontsize=12];
gt [color=none,fontsize=12];
gu [color=none,fontsize=12];
gv [color=none,fontsize=12];
gw [color=none,fontsize=12];
gx [color=none,fontsize=12];
gy [color=none,fontsize=12];

gaa [color=none,fontsize=12];
gab [color=none,fontsize=12];
gac [color=none,fontsize=12];
gad [color=none,fontsize=12];
gae [color=none,fontsize=12];
gaf [color=none,fontsize=12];
gag [color=none,fontsize=12];
gah [color=none,fontsize=12];
gai [color=none,fontsize=12];
gaj [color=none,fontsize=12];
gak [color=none,fontsize=12];
gal [color=none,fontsize=12];
gam [color=none,fontsize=12];
gan [color=none,fontsize=12];
gao [color=none,fontsize=12];
gap [color=none,fontsize=12];
gaq [color=none,fontsize=12];
#gaz [color=none,fontsize=12];
gas [color=none,fontsize=12];
gat [color=none,fontsize=12];
gau [color=none,fontsize=12];
gav [color=none,fontsize=12];
gaw [color=none,fontsize=12];
gax [color=none,fontsize=12];
gay [color=none,fontsize=12];

gaza [color=none,fontsize=12];
gazb [color=none,fontsize=12];
gazc [color=none,fontsize=12];
gazd [color=none,fontsize=12];
gaze [color=none,fontsize=12];
#gazf [color=none,fontsize=12];
gazg [color=none,fontsize=12];
gazh [color=none,fontsize=12];
gazi [color=none,fontsize=12];
gazj [color=none,fontsize=12];
gazk [color=none,fontsize=12];
gazl [color=none,fontsize=12];
gazm [color=none,fontsize=12];
gazn [color=none,fontsize=12];
gazo [color=none,fontsize=12];
gazp [color=none,fontsize=12];
gazq [color=none,fontsize=12];
gazr [color=none,fontsize=12];
gazs [color=none,fontsize=12];
gazt [color=none,fontsize=12];
gazu [color=none,fontsize=12];
gazv [color=none,fontsize=12];
gazw [color=none,fontsize=12];
gazx [color=none,fontsize=12];
gazy [color=none,fontsize=12];

root -> a  [minlen=2];
root -> b  [minlen=2];
root -> c  [minlen=2];
root -> d  [minlen=2];
root -> e  [minlen=2];
root -> f  [minlen=2];
root -> g  [minlen=2];
root -> h  [minlen=2];
root -> i  [minlen=2];
root -> j  [minlen=2];
root -> k  [minlen=2];
root -> l  [minlen=2];
root -> m  [minlen=2];
root -> n  [minlen=2];
root -> o  [minlen=2];
root -> p  [minlen=2];
root -> q  [minlen=2];
root -> r  [minlen=2];
root -> s  [minlen=20];
root -> t  [minlen=2];
root -> u  [minlen=2];
root -> v  [minlen=2];
root -> w  [minlen=2];
root -> x  [minlen=2];
root -> y  [minlen=2];
root -> 0  [minlen=2];
root -> 1  [minlen=2];
root -> 2  [minlen=2];
root -> 3  [minlen=2];
root -> 4  [minlen=2];
root -> 5  [minlen=2];
root -> 6  [minlen=2];
root -> 7  [minlen=2];
root -> 8  [minlen=2];
root -> 9  [minlen=2];
root -> "."  [minlen=2];

g -> ga  ;
g -> gb  ;
g -> gc  ;
g -> gd  ;
g -> ge  ;
g -> gf  ;
g -> gg  ;
g -> gh  ;
g -> gi  ;
g -> gj  ;
g -> gk  ;
g -> gl  ;
g -> gm  ;
g -> gn  ;
g -> go  ;
g -> gp  ;
g -> gq  ;
g -> gr  ;
g -> gs  ;
g -> gt  ;
g -> gu  ;
g -> gv  ;
g -> gw  ;
g -> gx  ;
g -> gy  ;

ga -> gaa  ;
ga -> gab  ;
ga -> gac  ;
ga -> gad  ;
ga -> gae  ;
ga -> gaf  ;
ga -> gag  ;
ga -> gah  ;
ga -> gai  ;
ga -> gaj  ;
ga -> gak  ;
ga -> gal  ;
ga -> gam  ;
ga -> gan  ;
ga -> gao  ;
ga -> gap  ;
ga -> gaq  ;
ga -> gaz  ;
ga -> gas  ;
ga -> gat  ;
ga -> gau  ;
ga -> gav  ;
ga -> gaw  ;
ga -> gax  ;
ga -> gay  ;

gaz -> gaza  ;
gaz -> gazb  ;
gaz -> gazc  ;
gaz -> gazd  ;
gaz -> gaze  ;
gaz -> gazf  ;
gaz -> gazg  ;
gaz -> gazh  ;
gaz -> gazi  ;
gaz -> gazj  ;
gaz -> gazk  ;
gaz -> gazl  ;
gaz -> gazm  ;
gaz -> gazn  ;
gaz -> gazo  ;
gaz -> gazp  ;
gaz -> gazq  ;
gaz -> gazr  ;
gaz -> gazs  ;
gaz -> gazt  ;
gaz -> gazu  ;
gaz -> gazv  ;
gaz -> gazw  ;
gaz -> gazx  ;
gaz -> gazy  ;

gazo -> "Blue Tuesday" ;
"Blue Tuesday" [ fontsize=10];

// Layout engines: circo dot fdp neato nop nop1 nop2 osage patchwork sfdp twopi 

}

This output is generated with:

twopi -os1.png -Tpng s1.dot

I’m posting here because the printout is pretty dreadful. All of the nodes hung of “gaz” are overlapping; I’ve tried specifying nodesep and it is simply ignored. I would like to see the lines from root to the single letters further apart, but again, I can’t control that.

This seems to be a bug in twopi. The documentation says it should clearly follow these directives, but it doesn’t seem to.

My questions:

  1. Is there any way to make twopi behave?
  2. Failing that, is there a better layout engine to use?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T00:54:28+00:00Added an answer on May 14, 2026 at 12:54 am

    I have found twopi to be the most difficult to work with of all the graphviz layout engines.

    I made a few small changes to your original dot file. The rendered graph is shown below.

    Here are the diffs:

    graph attributes:

    • size=”7.75,10.25″; // ensures that
      entire graph fits on a single 8.5 x
      11 page;

    • orientation=”landscape”;

    • ranksep=3.0; nodesep=2.0;

    • deleted: “root=root”; and
      “overlap=true”

    edge attributes:

    • i set the edge weight equal to 0.1
      for all edges: [weight=0.1]

    Reducing the edge weight by 90% for all edges has the net effect of increasing the edge length (or more precisely relaxing the constraint on edge length); obviously, this helps the nodes to “fan out”. Doing this also increases the distance between “g” and “root”, giving the child nodes of “root” more room.

    I also tweaked a few purely aesthetic attributes–not having any effect on the layout, but that to me, seem to matter when you need to draw even a moderately dense graph on a single page:

    graph attributes:

    fontname=”Helvetica”;
    fontsize=13

    node attributes:

    “root” [color=”goldenrod4″, shape=”diamond”, style=”filled”]

    “g” [color=”lightsteelblue2″, shape=”diamond”, style=”filled”]

    “ga” [color=”darkorange”, shape=”diamond”, style=”filled”]

    “gaz” [color=”bisque4″, shape=”diamond”, style=”filled”]

    edge attributes:

    [arrowsize=0.4, penwidth=1.2]
    alt text

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to draw a graph using Graphviz, but I need to add
I'm trying to draw a graph of the dependencies between C header files using
I'm trying to draw a simple line graph which would use values from the
I am trying to display a simple graph using pydot. My question is that
I am trying to draw a (undirected) graph using the Tikz package, such that
Here is what I'm struggling with today: I'm trying to draw a graph using
I am trying to construct a graph using cocoa.To display the points on x
i'm trying to draw a Graph with a user-friendly timeline having every day/week (to
Hi I am trying to draw one line graph and for that I am
I was trying a script to draw graph paper like grids on the canvas

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.