LoginSignup
50
45

More than 5 years have passed since last update.

gravizoを使ってMarkdown内でGraphvizのグラフを表示する

Posted at

gravizoというサービスを利用すればMarkdownの中にGraphviz互換のグラフが埋め込める模様。

使用例

![](http://g.gravizo.com/g?${Graphvizのソースコード})といった形式で表示するグラフを指定する。

以下、公式HPからの抜粋。

ソース:

![Alt text](http://g.gravizo.com/g?
digraph G {
aize ="4,4";
main [shape=box];
main -> parse [weight=8];
parse -> execute;
main -> init [style=dotted];
main -> cleanup;
execute -> { make_string; printf}
init -> make_string;
edge [color=red];
main -> printf [style=bold,label="100 times"];
make_string [label="make a string"];
node [shape=box,style=filled,color=".7 .3 1.0"];
execute -> compare;
}
)

結果:
Alt text


Markdownの中でグラフを使いたくなることはちょくちょくあるので、これは便利そう。

50
45
3

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
50
45