# How to create Ishikawa (fishbone) diagrams with LaTeX?

Is there an automated way or a "template" to create Ishikawa (also called "fishone") diagrams with LaTeX?

They are used e. g. to show the factors influencing a process and have a hiearchical structure:

• the horizontal main line is the process itself
• the big branches show the main factors
• and they can be detailed further to show the factors which influence or "compose" the main factors

For the usage:

• it would be great if the layout (distributing the branches equally) could be done more or less automatically

Example from wikipedia (http://en.wikipedia.org/wiki/Ishikawa_diagram):

-
Like all diagrams, it could be created using TikZ package. I am not aware of any packages that enable automated creation, however. – ipavlic Apr 19 '11 at 8:25
is there some general concept in TikZ which allows drawing hierarchical "tree" structures like that and then define the corresponding formatting? Is the automatic placing of the elements (for better distribution in the available space) possible with TikZ? – MostlyHarmless Apr 19 '11 at 8:54
Yes for a hierarchical tree structure, no for automatic placement. – Matthew Leingang Apr 19 '11 at 9:21
@Matthew Leingang: thanks for clarifying. So there is no way that TikZ could arrange the arrows automatically? Is there another tool which could do that? – MostlyHarmless Apr 19 '11 at 10:18

TikZ trees would probably be the way to go. However, things get pretty hairy fairly early on (example in Plain w/ XeTeX):

\input tikz
\usetikzlibrary{trees,shapes.geometric}
\tikzpicture[>=latex,font=\figfont,lbl/.style={draw=black,very thin,fill=#1,ellipse}]
\coordinate
child [grow=right] {
child {
child [grow=125] {
child [grow=left] {node {\tinyfigfont Cost of Transport} edge from parent[<-,thin]}
child {
child {node [lbl=yellow!20] {Transport}}
child [missing]
}
child [missing] edge from parent[<-,thick]
}
child [xshift=1cm] {
child [grow=125] {
child [grow=left] {node {\tinyfigfont Security} edge from parent[<-,thin]}
child {node [lbl=green!20!yellow] {Premises}}
child [missing] edge from parent[<-,thick]
}
child
child [grow=-125]
}
child [grow=-125] {
child [grow=left] {node {\tinyfigfont Consultation} edge from parent[<-,thin]}
child {node [lbl=purple!20] {Clients}}
child [missing] edge from parent[<-,thick]
}
}
};
\endtikzpicture
\bye


This could be improved upon a lot, but hopefully I could give you some idea.

-
thank you, that looks promising. As you say "example for pain with XeTeX": would it make a difference to use that in pdflatex or what does that mean? – MostlyHarmless Apr 20 '11 at 5:16
and could you explain what becomes "fairly hairy"? For a TikZ newbie like me the example looks ok and the code also? – MostlyHarmless Apr 20 '11 at 5:19
@Martin: I used XeTeX merely for the font here. With pdflatex the font-commands would look different I think. And the first \input tikz would be something different with pdflatex. Let me answer your other question with a question: Can you tell where would you put the next node? How about another one inside the "Transport"-branch? Yeah. Hairy. – morbusg Apr 20 '11 at 6:22