tikz: Kante kollidiert mit Knoten

Antwort erstellen


Diese Frage dient dazu, das automatisierte Versenden von Formularen durch Spam-Bots zu verhindern.
Smilies
:D :) :( :o :shock: :? 8) :lol: :-x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen:

BBCode ist eingeschaltet
[img] ist eingeschaltet
[flash] ist ausgeschaltet
[url] ist eingeschaltet
Smilies sind eingeschaltet

Die letzten Beiträge des Themas

Ich habe die Datenschutzerklärung gelesen und bin damit einverstanden.

   

Wenn du eine Datei oder mehrere Dateien anhängen möchtest, gib die Details unten ein.

Ansicht erweitern Die letzten Beiträge des Themas: tikz: Kante kollidiert mit Knoten

von Beinschuss » Do 10. Sep 2015, 20:51

Elkes Lösung hat den Vorteil, dass die Zeichnung stabil bleibt, wenn man noch weitere Elemente einfügt und sich dadurch was verschiebt. Sie ist daher vorzuziehen.

von esdd » Do 10. Sep 2015, 19:05

Möglich wäre auch
\draw (BoxIni1.south) |- ([xshift=-2em,yshift=-2em]BoxIni1.south west) |- (1000.west); 
Dann muss keine absolute Koordinate angegeben werden, sondern nur der horizontale bzw. vertikale Abstand zur Box (hier beides 2em).

Gruß
Elke

von Beinschuss » Do 10. Sep 2015, 08:33

Es mag elegantere Lösungen geben, aber:
\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) |- (-5,-7) |- (1000.west);
      \end{tikzpicture}
\end{figure}
\end {document}
sollte funktionieren.

Helmut

tikz: Kante kollidiert mit Knoten

von musmus » Do 10. Sep 2015, 05:27

Ich möchte einen Pfeil vom unteren Teil der Box zum "i <= 1000"-Diamanten ziehen. Allerdings wird dieser Pfeil direkt über die Box gezogen, anstatt an dieser vorbeizuführen. Wie kann ich dies verhindern?
\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)
		(BoxIni1.south) edge node {} (1000);
		\end{tikzpicture}
\end{figure}
\end {document}

Nach oben