# How to create this figure?

I have now spend hours by creating this figure - without luck.

I have tried different types of tikz, tikzpicture, pstricks and multido usepackage. Can you maybe help me? I would really appreciate it.

-
Have you been able to do any part of this? Can you show us that code? – Torbjørn T. Apr 18 '14 at 18:46
It would only be the preamble, you get. I start and start over again, and that is pissing me off. :) I know how to make the arrows into the boxes, but my problem is to make the boxes and make it available to put text in them. – A. F. Apr 18 '14 at 18:50
Even the preamble and the arrows would save people some of the work involved in helping you. Even just the framework of a document shows you've made an effort and prevents anybody who wants to help having to start over from scratch. – cfr Apr 19 '14 at 3:22

One option using TikZ; the fit library was used just to draw the outer frame; depending on the actual requirements, this can be done without the library (see second example code below):

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{fit}

\begin{document}

\begin{tikzpicture}[
mytext/.style={
draw,
text width=#1,
align=center,
minimum height=1.5cm
},
ar/.style={
->,
>=latex
}
]
\node[mytext=3cm,minimum height=8cm] (left)
{2 text text text};
\node[mytext=4cm,anchor=north west]
at ([xshift=1.5cm]left.north east) (middle1)
{4 text text text};
\node[mytext=4cm,anchor=west]
at ([xshift=1.5cm]left.east) (middle2)
{5 text text text};
\node[mytext=4cm,anchor=south west]
at ([xshift=1.5cm]left.south east) (middle3)
{6 text text text};
\node[mytext=3cm,minimum height=8cm,anchor=north west]
at ([xshift=1.5cm]middle1.north east) (right)
{8 text text text};
\coordinate (aux) at ([yshift=3cm]middle1);
\node[mytext=4cm,dashed,minimum height=0.8cm,anchor=north]
at (aux) (middle0)
{3 text text};
\node[mytext=3cm,dashed,anchor=north]
at (left.center|-aux) (left0)
{1 text text};
\node[mytext=3cm,dashed,anchor=north]
at (right.center|-aux) (right0)
{7 text text};
\node[draw,inner sep=10pt,fit={(left0) (right)}] {};

\foreach \Valor in {1,2,3}
{
\draw[ar]
(left.east|-middle\Valor.west) -- (middle\Valor.west);
\draw[ar]
(middle\Valor.east) -- (right.west|-middle\Valor.west);
}
\end{tikzpicture}

\end{document}


Without the fit library (the result is the same as in the picture above):

\documentclass{article}
\usepackage{tikz}

\begin{document}

\begin{tikzpicture}[
mytext/.style={
draw,
text width=#1,
align=center,
minimum height=1.5cm
},
ar/.style={
->,
>=latex
}
]
\node[mytext=3cm,minimum height=8cm] (left)
{2 text text text};
\node[mytext=4cm,anchor=north west]
at ([xshift=1.5cm]left.north east) (middle1)
{4 text text text};
\node[mytext=4cm,anchor=west]
at ([xshift=1.5cm]left.east) (middle2)
{5 text text text};
\node[mytext=4cm,anchor=south west]
at ([xshift=1.5cm]left.south east) (middle3)
{6 text text text};
\node[mytext=3cm,minimum height=8cm,anchor=north west]
at ([xshift=1.5cm]middle1.north east) (right)
{8 text text text};
\coordinate (aux) at ([yshift=3cm]middle1);
\node[mytext=4cm,dashed,minimum height=0.8cm,anchor=north]
at (aux) (middle0)
{3 text text};
\node[mytext=3cm,dashed,anchor=north]
at (left.center|-aux) (left0)
{1 text text};
\node[mytext=3cm,dashed,anchor=north]
at (right.center|-aux) (right0)
{7 text text};
\draw
([shift={(-10pt,10pt)}]left0.north west)
rectangle
([shift={(10pt,-10pt)}]right.south east);

\foreach \Valor in {1,2,3}
{
\draw[ar]
(left.east|-middle\Valor.west) -- (middle\Valor.west);
\draw[ar]
(middle\Valor.east) -- (right.west|-middle\Valor.west);
}
\end{tikzpicture}

\end{document}

-
First of all, thank you very much. I have two questions: 1) How to make a black frame outside the figure, as showed? 2) If I would like to the figure and the text a bit smaller - and not std. setting, how can I do that? Thanks again. – A. F. Apr 19 '14 at 7:58
I solved the problem. Thank you again!! – A. F. Apr 19 '14 at 10:23
[thick,scale=0.6, every node/.style={transform shape}] – A. F. Apr 19 '14 at 10:23
\documentclass{article}
\usepackage{pst-node,pst-blur}
\begin{document}

\psframe[blur=0,framearc=0,fillcolor=black!10,fillstyle=solid](-0.5,-0.5)(13.5,10.5)
\psTextFrame[style=Dashed](0,8.5)(3,10){1 text text}
\psTextFrame(0,0)(3,8){2 text text text}
%
\psTextFrame[style=Dashed](4.5,9)(8.5,10){3 text text text}
\psTextFrame(4.5,6.5)(8.5,8){4 text text text}
\psTextFrame(4.5,3.25)(8.5,4.75){5 text text text}
\psTextFrame(4.5,0)(8.5,1.5){6 text text text}
%
\psTextFrame[style=Dashed](10,8.5)(13,10){7 text text}
\psTextFrame(10,0)(13,8){8 text text text}
%