8
6

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.

Graphvizのshapeの一覧とサンプル

Last updated at Posted at 2019-01-09

はじめに

システムの構成図を作るのに、Excelでオブジェクトぺたぺたしたくないので調べている途中に作りました

下記を参考にしています
https://www.graphviz.org/doc/info/shapes.html

59種類あるようです

環境

  • windows10
  • dot - graphviz version 2.38.0 (20140413.2041)
  • 利用エディタ VSCode 1.30.2

成果物(図)

shapes.png

コマンド(windows10 cmd)

dot -Tpng shapes.dot -o shapes.png

実行すると下記が表示されましたが、なんかそれっぽいのが出てました。


Warning: using box for unknown shape cylinder
Warning: using box for unknown shape plain

ソース

長いので畳みます

ソース
shapes.dot
digraph syusaku_shapes {

assembly  [shape =assembly];
box  [shape =box];
box3d  [shape =box3d];
cds  [shape =cds];
circle  [shape =circle];
component  [shape =component];
cylinder  [shape =cylinder];
diamond  [shape =diamond];
doublecircle  [shape =doublecircle];
doubleoctagon  [shape =doubleoctagon];
egg  [shape =egg];
ellipse  [shape =ellipse];
fivepoverhang  [shape =fivepoverhang];
folder  [shape =folder];
hexagon  [shape =hexagon];
house  [shape =house];
insulator  [shape =insulator];
invhouse  [shape =invhouse];
invtrapezium  [shape =invtrapezium];
invtriangle  [shape =invtriangle];
larrow  [shape =larrow];
lpromoter  [shape =lpromoter];
Mcircle  [shape =Mcircle];
Mdiamond  [shape =Mdiamond];
Msquare  [shape =Msquare];
none  [shape =none];
note  [shape =note];
noverhang  [shape =noverhang];
octagon  [shape =octagon];
oval  [shape =oval];
parallelogram  [shape =parallelogram];
pentagon  [shape =pentagon];
plain  [shape =plain];
plaintext  [shape =plaintext];
point  [shape =point];
polygon  [shape =polygon];
primersite  [shape =primersite];
promoter  [shape =promoter];
proteasesite  [shape =proteasesite];
proteinstab  [shape =proteinstab];
rarrow  [shape =rarrow];
rect  [shape =rect];
rectangle  [shape =rectangle];
restrictionsite  [shape =restrictionsite];
ribosite  [shape =ribosite];
rnastab  [shape =rnastab];
rpromoter  [shape =rpromoter];
septagon  [shape =septagon];
signature  [shape =signature];
square  [shape =square];
star  [shape =star];
tab  [shape =tab];
terminator  [shape =terminator];
threepoverhang  [shape =threepoverhang];
trapezium  [shape =trapezium];
triangle  [shape =triangle];
tripleoctagon  [shape =tripleoctagon];
underline  [shape =underline];
utr  [shape =utr];



assembly->box
box->box3d
box3d->cds
cds->circle
circle->component
component->cylinder
cylinder->diamond
diamond->doublecircle
doublecircle->doubleoctagon
doubleoctagon->egg
egg->ellipse
ellipse->fivepoverhang
fivepoverhang->folder
folder->hexagon
hexagon->house
house->insulator
insulator->invhouse
invhouse->invtrapezium
invtrapezium->invtriangle
invtriangle->larrow
larrow->lpromoter
lpromoter->Mcircle
Mcircle->Mdiamond
Mdiamond->Msquare
Msquare->none
none->note
note->noverhang
noverhang->octagon
octagon->oval
oval->parallelogram
parallelogram->pentagon
pentagon->plain
plain->plaintext
plaintext->point
point->polygon
polygon->primersite
primersite->promoter
promoter->proteasesite
proteasesite->proteinstab
proteinstab->rarrow
rarrow->rect
rect->rectangle
rectangle->restrictionsite
restrictionsite->ribosite
ribosite->rnastab
rnastab->rpromoter
rpromoter->septagon
septagon->signature
signature->square
square->star
star->tab
tab->terminator
terminator->threepoverhang
threepoverhang->trapezium
trapezium->triangle
triangle->tripleoctagon
tripleoctagon->underline
underline->utr
utr->assembly

}

おわりに

いろいろな図はコード化して管理したい

Chart as Code!

8
6
1

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
8
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?