Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graphs can be made with DOT #1

Open
MecuSorin opened this issue Feb 19, 2019 · 0 comments
Open

Graphs can be made with DOT #1

MecuSorin opened this issue Feb 19, 2019 · 0 comments

Comments

@MecuSorin
Copy link

Graphs can be made with DOT then added to the repo and embedded in markdown.
This is an example:

digraph G {
  ratio="fill";
  size="5,4!";
  margin=0;
  node [shape=plaintext];
  A [label="ListF a [a]"];
  B [label="[a]"];
  C [label="b"];
  D [label="ListF a b"];
  A -> B [label="embedL"];
  A -> D [label="fmap (foldL bAlgebra)", style=dotted];
  B -> A [label="projectL"];
  B -> C [label="foldL bAlgebra", style=dotted];
  D -> C [label="bAlgebra"];

  { rank=same; A B }
  { rank=same; D C } 
}

The output is similar to: https://dreampuf.github.io/GraphvizOnline/#digraph%20G%20%7B%0D%0A%20%20ratio%3D%22fill%22%3B%0D%0A%20%20size%3D%225%2C4!%22%3B%0D%0A%20%20margin%3D0%3B%0D%0A%20%20node%20%5Bshape%3Dplaintext%5D%3B%0D%0A%20%20A%20%5Blabel%3D%22ListF%20a%20%5Ba%5D%22%5D%3B%0D%0A%20%20B%20%5Blabel%3D%22%5Ba%5D%22%5D%3B%0D%0A%20%20C%20%5Blabel%3D%22b%22%5D%3B%0D%0A%20%20D%20%5Blabel%3D%22ListF%20a%20b%22%5D%3B%0D%0A%20%20A%20-%3E%20B%20%5Blabel%3D%22embedL%22%5D%3B%0D%0A%20%20A%20-%3E%20D%20%5Blabel%3D%22fmap%20(foldL%20bAlgebra)%22%2C%20style%3Ddotted%5D%3B%0D%0A%20%20B%20-%3E%20A%20%5Blabel%3D%22projectL%22%5D%3B%0D%0A%20%20B%20-%3E%20C%20%5Blabel%3D%22foldL%20bAlgebra%22%2C%20style%3Ddotted%5D%3B%0D%0A%20%20D%20-%3E%20C%20%5Blabel%3D%22bAlgebra%22%5D%3B%0D%0A%0D%0A%20%20%7B%20rank%3Dsame%3B%20A%20B%20%7D%0D%0A%20%20%7B%20rank%3Dsame%3B%20D%20C%20%7D%20%0D%0A%7D%0D%0A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant