-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ch. 17: fix diagrams and embed them in the text
- Swap the ordering to match the order in the text (concurrent is first, at least for now). - Make them go left-to-right instead of top-to-bottom for compactness in the text. - Fix rendering issues resulting from the VS Code extension doing things that normal `dot` does not, for who knows what reasons.
- Loading branch information
1 parent
cfaf187
commit 472f152
Showing
6 changed files
with
262 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,44 @@ | ||
digraph { | ||
dpi = 300.0; | ||
|
||
Parallel [label = "Parallel";shape = "plaintext";]; | ||
rankdir = "TB"; | ||
splines = false; | ||
cluster = true; | ||
rankdir = "LR"; | ||
|
||
// makes ordering between subgraphs work | ||
newrank = true; | ||
|
||
node [shape = diamond;]; | ||
|
||
subgraph cluster_ColleagueA { | ||
newrank = true; | ||
label = "Task 1"; | ||
A1 -> A2 -> A3 -> A4; | ||
subgraph cluster_task_a { | ||
label = "Task A"; | ||
|
||
A1; | ||
A2; | ||
A3; | ||
A4; | ||
|
||
A1 -> A2 -> A3 -> A4 -> A0 [style = invis;]; | ||
|
||
// for vertical alignment purposes only | ||
A0 [style = invis;]; | ||
|
||
// Makes the heights line up between the boxes. | ||
A4 -> A0 [style = invis;]; | ||
} | ||
|
||
subgraph cluster_ColleagueB { | ||
label = "Task 2"; | ||
B1 -> B2 -> B3; | ||
subgraph cluster_task_b { | ||
label = "Task B"; | ||
|
||
// for horizontal alignment purposes only | ||
// newrank = true; | ||
|
||
B0 [style = invis;]; | ||
|
||
B1; | ||
B2; | ||
B3; | ||
|
||
B0 -> B1 -> B2 -> B3 [style = invis;]; | ||
} | ||
|
||
A1 -> B1 -> A2 -> B2 -> A3 -> A4 -> B3; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,20 @@ | ||
digraph { | ||
dpi = 300.0; | ||
|
||
Concurrent [label = "Concurrent";shape = "plaintext";]; | ||
rankdir = "TB"; | ||
rankdir = "LR"; | ||
splines = false; | ||
cluster = true; | ||
|
||
node [shape = diamond;]; | ||
|
||
subgraph cluster_task_a { | ||
label = "Task A"; | ||
|
||
// makes ordering between subgraphs work | ||
subgraph cluster_ColleagueA { | ||
newrank = true; | ||
|
||
A1; | ||
A2; | ||
A3; | ||
A4; | ||
|
||
// for vertical alignment purposes only | ||
A0 [style = invis;]; | ||
|
||
edge [style = invis;]; | ||
label = "Task 1"; | ||
A1 -> A2 -> A3 -> A4; | ||
} | ||
|
||
subgraph cluster_task_b { | ||
label = "Task B"; | ||
cluster = true; | ||
|
||
// for vertical alignment purposes only | ||
newrank = true; | ||
|
||
B0 [style = invis;]; | ||
|
||
B1; | ||
B2; | ||
B3; | ||
subgraph cluster_ColleagueB { | ||
label = "Task 2"; | ||
B1 -> B2 -> B3; | ||
} | ||
|
||
A1 -> B1 -> A2 -> B2 -> A3 -> A4 -> B3; | ||
|
||
// Makes the heights line up between the boxes. | ||
A4 -> A0 [style = invis;]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.