12
12

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Ruby | Gviz で我が家の恋愛相関図を書いた

Posted at

Ruby | Gviz で我が家の恋愛相関図を書いた

概要

我が家の恋愛相関図が入り組んで来たので Gviz で可視化します。

コード

require "gviz"

Graph do
  global layout:'dot', overlap:false
  nodes width: 3, height: 2, fontname:'MS UI GOTHIC'
  edges fontsize: 20, fontname:'MS UI GOTHIC'

  node :Husband, {label: '私'}
  node :Wife, {label: "妻"}
  node :OldestDaughter, {label: "長女"}
  node :SecondDaughter, {label: "次女"}
  edge :Wife_OldestDaughter, {label: "結婚しないでずっとそばにいて"}
  edge :Wife_SecondDaughter, {label: "結婚しないでずっとそばにいて"}
  edge :OldestDaughter_Husband, {label: "パパ結婚して"}
  edge :SecondDaughter_OldestDaughter, {label: "お姉ちゃん結婚して"}
  edge :Husband_OldestDaughter, {label: "いいよ"}
  edge :Husband_Wife, {label: "結婚してる"}
  edge :Wife_Husband, {label: "結婚してる"}

  save :"family", :png
end

出力

family.png

12
12
0

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
12
12

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?