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 am asking about the best tool that you used before to convert a
Before I asked this question I had a look through the search results for
I asked question before asking if it is possible to save complex class composition
Before asking this question I have Googled for this problem and I have looked
Before you answer this I have never developed anything popular enough to attain high
Before I start, I know there is this post and it doesn't answer my
A couple of years ago, before I knew about Stack Overflow, I was working
Before everyone jumps on me for outsourcing my homework, my question is not a
I want to pop up a dialog before an html page is unloaded asking
sorry for asking this dumb question i will try to explain as good as

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.