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 8222373
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T14:15:27+00:00 2026-06-07T14:15:27+00:00

I’m trying to visualise the following data in dot format using GraphViz: digraph n

  • 0

I’m trying to visualise the following data in dot format using GraphViz:

digraph n {
  node [nodesep=2.0, fontsize=11];
  graph [ overlap=false];
  edge[weight=0.2];
  A -> B [label="I/5"]
  A -> A [label="*/0"]
  A -> C [label="ii/2"]
  A -> H [label="vii/1"]
  B -> D [label="iii/1"]
  B -> E [label="IV/2"]
  B -> F [label="V/2"]
  B -> B [label="vi/2"]
  C -> F [label="V/2"]
  C -> H [label="vii/1"]
  D -> E [label="IV/2"]
  E -> D [label="iii/2"]
  E -> G [label="iv/1"]
  E -> F [label="V/3"]
  F -> B [label="I/4"]
  F -> B [label="vi/1"]
  F -> B [label="*/0"]
  G -> B [label="I/5"]
  H -> B [label="vi/1"]
}

Running the following command:
neato -Tpng Chord_NFA.dot > Chord_NFA.png

gives me this output:

I’d like it to fit on A4 and for none of the edges to overlap or cross over a node. This is possible (mathematically) because I did it myself with a biro.

  • 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-06-07T14:15:29+00:00Added an answer on June 7, 2026 at 2:15 pm

    I played with it a few and got this:

    digraph n {
      node [nodesep=2.0, fontsize=11];
      graph [overlap = false];
      subgraph cluster_a {
        style=invisible;
        A; B; H;
      }
      subgraph cluster_b {
        style=invisible;
        D; E; G;
      }
      subgraph cluster_c {
        style=invisible;
        C; F;
      }
      A -> B [label="I/5"];
      A -> A [label="*/0"];
      A -> C [label="ii/2"];
      A -> H [label="vii/1"];
      B:w -> D [label="iii/1"];
      B:nw -> E [minlen=3 label="IV/2"];
      B -> F [minlen=2 label="V/2"];
      B -> B [label="vi/2"];
      C -> F [minlen=2 label="V/2"];
      C -> H [label="vii/1"];
      D -> E [label="IV/2"];
      D -> E [minlen=2 dir=back label="iii/2"];
      G -> E [minlen=2 dir=back label="iv/1"];
      F -> E [dir=back label="V/3"];
      B -> F [minlen=2 dir=back label="I/4"];
      B -> F [minlen=2 dir=back label="vi/1"];
      B -> F [minlen=2 dir=back label="*/0"];
      B -> G [dir=back label="I/5"];
      H -> B [label="vi/1"];
    }
    

    Compile with:

    dot -Tpng -o Chord_NFA.png Chord_NFA.gv
    

    The output is this, without any line crossings:

    graph

    The trick is:

    1. To add the minlen attribute to force some separation, giving more spacing for rendering without overlaps and crossings.

    2. To invert the logic of some edges (rendering them uninverted with dir=back). This way, dot always sees an acyclic graph and can order the edges without getting confused.

    3. Focusing in some subgraphs first and grouping their nodes in clusters to give they some “protection” from interference when rendering the rest of the graph.

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

Sidebar

Related Questions

I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this

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.