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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:37:41+00:00 2026-05-22T18:37:41+00:00

Before asking, I tried to search the answer for my question, buf I couldn’t

  • 0

Before asking, I tried to search the answer for my question, buf I couldn’t find.
My question is about changing edge direction in dot diagram. Rankdir is ‘LR’, but in certain part of graph, I want to use ‘TB’. Let me give an example.

digraph G {
  rankdir=LR;
  size="7,5";
  browser->ui_thread;
  browser->db_thread;
  browser->webkit_thread;
  browser->cache_thread;
  browser->file_thread;
  browser->io_thread;
  io_thread[style=filled];
  cache_thread[style=filled];
  ui_thread->thread[label=inherit];
  ui_thread->messageloop[style=dotted];
  db_thread->messageloop[style=dotted];
  webkit_thread->messageloop[style=dotted];
  cache_thread->messageloop[style=dotted];
  file_thread->messageloop[style=dotted];
  io_thread->messageloop[style=dotted];
}

it gives out graph like this
output graph

But, this is not what I want.
I want the following image. “thread” is above “ui_thread” vertically.
enter image description here
You may think it can be solved easily using “rankdir=same” with “thread” and “ui_thread”.
I sure tried this already. but I failed. “thread” is always below “ui_thread”.

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-22T18:37:42+00:00Added an answer on May 22, 2026 at 6:37 pm

    Unfortunately, graph direction can only be specified once, and the whole graph stays in that direction. In this situation, you can usually get the desired effect with a combination of constraint=false and invisible edges to force some ordering.

    This code will produce your second image:

    digraph G {
      rankdir=LR;
      size="7,5";
      browser->thread[style=invis];
      browser->ui_thread;
      browser->db_thread;
      browser->webkit_thread;
      browser->cache_thread;
      browser->file_thread;
      browser->io_thread;  
      io_thread[style=filled];
      cache_thread[style=filled];
      ui_thread->thread[label=inherit constraint=false]; 
      ui_thread->messageloop[style=dotted];
      db_thread->messageloop[style=dotted];
      webkit_thread->messageloop[style=dotted];
      cache_thread->messageloop[style=dotted];
      file_thread->messageloop[style=dotted];
      io_thread->messageloop[style=dotted];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I searched before asking this question. I didn't find an answer probably because I
I´ve tried to google it before asking here and I couldn´t find any solution.
I've tried to really look this one up before asking a question but it
i have asked this question before but no answer was there. so asking again.
I tried to search a bit before asking but I really had no idea
I tried asking this before but didnt really get an answer so Ill try
This error is driving me crazy . I tried freenode #emberjs before asking here.
Before asking the question let me preface with the fact that I am new
Before asking my question, let me explain the context. CONTEXT: I have a web
Before asking a question, and before you all get mad because there are a

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.