Tikz: Pfeil beschriften

Tabellen und Grafiken erstellen und anordnen


musmus
Forum-Newbie
Forum-Newbie
Beiträge: 2
Registriert: Do 10. Sep 2015, 05:15

Tikz: Pfeil beschriften

Beitrag von musmus »

Hallo,
Wie kann ich den Pfeil vom Kasten zum Knoten "i <= 1000" beschriften?
\documentclass[12pt,leqno,a4paper]{article}
\usepackage{tikz}
\usepackage{tikz-dependency}
\usetikzlibrary{arrows}
\usetikzlibrary{shapes}
\begin{document}
\begin{figure}
\begin{tikzpicture}[->,>=stealth',shorten >=0.5pt,auto,node distance=3cm,
thick,cloud node/.style={cloud,draw,cloud puffs=10,cloud puff arc=120, aspect=2.5, inner ysep=1em}, circle node/.style={circle,draw}, square node/.style={rectangle,draw}, diamond node/.style={diamond,draw, aspect=2}]


\node[diamond node] (1000) {$i \le 1000$};


\node[square node] (ProdT1) [below of=1000] {More talented agent: Production};
\node[square node, align=left] (1CatT0) [below left of=ProdT1] {Less talented agent:\\Categorisation};
\node[square node, align=left] (1CatT1) [below right of=ProdT1] {More talented agent:\\Categorisation};
\node[draw, fit=(ProdT1) (1CatT0) (1CatT1)] (BoxIni1) {};

\path[every node/.style={font=\sffamily\small}]
(1000) edge node {yes} (BoxIni1)
(ProdT1) edge node {} (1CatT0)
(ProdT1) edge node {} (1CatT1);
\draw (BoxIni1.south) |- ([xshift=-2em,yshift=-2em]BoxIni1.south west) |- (1000.west); % Soll beschriftet werden
\end{tikzpicture}
\end{figure}
\end {document}

esdd
Forum-Meister
Forum-Meister
Beiträge: 2561
Registriert: So 7. Feb 2010, 16:36

Beitrag von esdd »

Wo soll denn die Beschriftung hin? Möglich wäre zum Beispiel:
\draw (BoxIni1.south) 
  -- node[right]{Text 1} +(0,-2em)
  -- node[below]{Text 2} ([xshift=-2em,yshift=-2em]BoxIni1.south west)
  -- node[left]{Text 3} ([xshift=-2em]BoxIni1.west|-1000.west)
  -- node[above]{Text 4} (1000.west); % Soll beschriftet werden 

Antworten