Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get different ranksep for certain ranks

I want my bottom rank of nodes to have smaller ranksep than the rest of my graph. How do you do this? I can't seem to find the right syntax to set ranksep separately for different subgraphs.

This is not working - all ranks are separated the same (both the big ranksep and small ranksep are ignored):

graph G{
  {  ranksep=1.0; // big separation
     1 -- 2
     1 -- 3
  }
  {  ranksep=0.2;  // small separation
     2 -- 4
     2 -- 5
     3 -- 6
     3 -- 7
  }
}

Result:

ranksep

like image 471
latkin Avatar asked Sep 17 '13 21:09

latkin


People also ask

How do you make a ranking system?

Take the number of last place votes and rank them (inversely, obviously) based on that. Create some weighted combination of ranks, depending on what you think reasonable. Show activity on this post. As others have pointed out, there are a lot of options you might pursue.

How to use rank function in Excel?

Explanation of RANK Function in Excel 1 Number: This is the value or number we want to find the rank. 2 Ref: This is the list of numbers in a range or in an array you want to your “Number” compared to. 3 [Order]: Whether you want your ranking in Ascending or Descending order. Type 0 for descending and type 1 for ascending... More ...

How do you rank a team in Eq?

=RANK.EQ (B3, $B$2:$B$13) returned a number (rank) of 1. This team scored 105 points, which is the highest among all the 12 teams we have taken into consideration. Therefore, the formula ranked it as 1, i.e. first rank.

How do you rank items in a poll?

Take the median rank and then rank the medians (but this may result in ties) Take the number of 1st place votes each item got, and rank them based on this Take the number of last place votes and rank them (inversely, obviously) based on that. Create some weighted combination of ranks, depending on what you think reasonable.


2 Answers

ranksep is an graph attribute (not subgraph), and cannot be used to vary the distance between ranks within the same graph in dot.

like image 54
marapet Avatar answered Sep 22 '22 03:09

marapet


You can specifiy a minimum length for an edge. From dotguide : "minlen defines the minimum difference between the ranks of the head and tail". Note that you'll may have to tune both ranksep (global) and minlen to tune the aspect of your graph.

graph G{
  ranksep=0.1;  // small separation
  {  
     1 -- 2 [ minlen =4]
     1 -- 3 [ minlen =4]
  }
  {  
     2 -- 4
     2 -- 5
     3 -- 6
     3 -- 7
  }
}

Result : edge min length

like image 26
Laurent Bauer Avatar answered Sep 22 '22 03:09

Laurent Bauer