Drkcore

04 01 2011 javascript graph Tweet

GraphvizでSyntax diagramを描こうとしたけどうまくいかなかった

JGPのsyntax diagramみたいなのをGraphvizで描きたくて色々頑張ってみたんだけど、僕には無理だった。

railroad diagram

graph Heawood {
      node [label="\N", fontname=Arial, width="0.50000", height="0.500000", color=black];
      edge [color=black];
      graph [rankdir = LR];

      subgraph cluster1 {
               color=none

               Start [style=invis];
               L1 [style=invis, width=0.0, shape=point];
               Alpha [shape=box, label="アルファベット"];
               L2 [style=invis, width=0.0, shape=point];
           End [style=invis];

           Start -- L1 [arrowtail=teetee];
               L1    -- Alpha;
               Alpha -- L2;
               L2    -- End [arrowhead=teetee];

      }

      Digit [shape=box, label="   数字   "];
      Hif [shape=circle, label="-"];

      L1    -- Digit [tailport=w,headport=w];
      L1    -- Hif [tailport=w,headport=w];
      Digit -- L2 [tailport=e,headport=w];
      Hif   -- L2 [tailport=e,headport=w];
}

ProductName JavaScript: The Good Parts ―「良いパーツ」によるベストプラクティス
Douglas Crockford
オライリージャパン / 1890円 ( 2008-12-22 )


参考

  • プロセスダイアグラムの描き方
  • What's the name for this type of flowchart?
  • Haskellで構文ダイアグラム

About

  • もう5年目(wishlistありマス♡)
  • 最近はPythonとDeepLearning
  • 日本酒自粛中
  • ドラムンベースからミニマルまで
  • ポケモンGOゆるめ

Tag

Python Deep Learning javascript chemoinformatics Emacs sake and more...

Ad

© kzfm 2003-2021