Browse Source

Slant text to arrow

Martin Thoma 9 years ago
parent
commit
23462814aa

BIN
tikz/agent-environment-diagram-mdp/agent-environment-diagram-mdp.png


+ 4 - 3
tikz/agent-environment-diagram-mdp/agent-environment-diagram-mdp.tex

@@ -1,15 +1,16 @@
 \documentclass[varwidth=true, border=2pt]{standalone}
 
 \usepackage{tikz}
-\usetikzlibrary{shapes,snakes,shapes.geometric,positioning}
+\usetikzlibrary{shapes,snakes,shapes.geometric,positioning,decorations.text}
 
 \begin{document}
+\tikzstyle{arrow}=[bend left,->,very thick, line cap=round]
 \begin{tikzpicture}[node distance=2cm]
     \node[ellipse,draw,minimum width=80pt,minimum height=20pt,fill=gray!5] (a) {Agent};
     \node[ellipse,draw,minimum width=80pt,minimum height=20pt,fill=gray!5,below of=a] (u) {Umwelt};
 
     % Arrows
-    \draw[bend left,->,very thick] (a.east) to node [auto] {Aktion $a_k$} (u.east);
-    \draw[bend left,->,very thick] (u.west) to node [auto] {Zustand $x_k$} (a.west);
+    \draw[arrow,postaction={decorate,decoration={text along path,raise=0.08cm,text align=center,text={Aktion {$a_k$}}}}] (a.east) to node {} (u.east);
+    \draw[arrow,postaction={decorate,decoration={text along path,raise=0.08cm,text align=center,text={Zustand {$x_k$}}}}] (u.west) to node {} (a.west);
 \end{tikzpicture}
 \end{document}

+ 1 - 1
tikz/agent-environment-diagram-pomdp/Makefile

@@ -1,7 +1,7 @@
 SOURCE = agent-environment-diagram-pomdp
 DELAY = 80
 DENSITY = 300
-WIDTH = 512
+WIDTH = 256
 
 make:
 	pdflatex $(SOURCE).tex -output-format=pdf

BIN
tikz/agent-environment-diagram-pomdp/agent-environment-diagram-pomdp.png


+ 5 - 4
tikz/agent-environment-diagram-pomdp/agent-environment-diagram-pomdp.tex

@@ -1,15 +1,16 @@
-\documentclass[varwidth=true, border=2pt]{standalone}
+\documentclass[varwidth=true, border=14pt]{standalone}
 
 \usepackage{tikz}
-\usetikzlibrary{shapes,snakes,shapes.geometric,positioning}
+\usetikzlibrary{shapes,snakes,shapes.geometric,positioning,decorations.text}
 
 \begin{document}
+\tikzstyle{arrow}=[bend left,->,very thick, line cap=round]
 \begin{tikzpicture}[node distance=2cm]
     \node[ellipse,draw,minimum width=80pt,minimum height=20pt,fill=gray!5] (a) {Agent};
     \node[ellipse,draw,minimum width=80pt,minimum height=20pt,fill=gray!5,below of=a] (u) {Umwelt};
 
     % Arrows
-    \draw[bend left,->,very thick] (a.east) to node [auto] {Aktion $a_k$} (u.east);
-    \draw[bend left,->,very thick] (u.west) to node [auto] {Beobachtung $z_k$} (a.west);
+    \draw[arrow,postaction={decorate,decoration={text along path,raise=0.08cm,text align=center,text={Aktion {$a_k$}}}}] (a.east) to node {} (u.east);
+    \draw[arrow,postaction={decorate,decoration={text along path,raise=0.08cm,text align=center,text={Beob. {$z_k$}}}}] (u.west) to node {} (a.west);
 \end{tikzpicture}
 \end{document}

+ 1 - 1
tikz/agent-environment-diagram-rl/Makefile

@@ -1,7 +1,7 @@
 SOURCE = agent-environment-diagram-rl
 DELAY = 80
 DENSITY = 300
-WIDTH = 512
+WIDTH = 256
 
 make:
 	pdflatex $(SOURCE).tex -output-format=pdf

BIN
tikz/agent-environment-diagram-rl/agent-environment-diagram-rl.png


+ 5 - 4
tikz/agent-environment-diagram-rl/agent-environment-diagram-rl.tex

@@ -1,15 +1,16 @@
-\documentclass[varwidth=true, border=2pt]{standalone}
+\documentclass[varwidth=true, border=6pt]{standalone}
 
 \usepackage{tikz}
-\usetikzlibrary{shapes,snakes,shapes.geometric,positioning}
+\usetikzlibrary{shapes,snakes,shapes.geometric,positioning,decorations.text}
 
 \begin{document}
+\tikzstyle{arrow}=[bend left,->,very thick, line cap=round]
 \begin{tikzpicture}[node distance=2cm]
     \node[ellipse,draw,minimum width=80pt,minimum height=20pt,fill=gray!5] (a) {Agent};
     \node[ellipse,draw,minimum width=80pt,minimum height=20pt,fill=gray!5,below of=a] (u) {Umwelt};
 
     % Arrows
-    \draw[bend left,->,very thick] (a.east) to node [auto] {Aktion $a_k$} (u.east);
-    \draw[bend left,->,very thick] (u.west) to node [auto, align=left, text width=3cm] {Zustand $x_k$,\newline{}Kosten /\newline{}Belohnung $r_k$} (a.west);
+    \draw[arrow,postaction={decorate,decoration={text along path,raise=0.08cm,text align=center,text={Aktion {$a_k$}}}}] (a.east) to node {} (u.east);
+    \draw[arrow] (u.west) to node [auto, align=left, text width=1.8cm] {Zustand $x_k$,\newline{}Kosten /\newline{}Belohnung $r_k$} (a.west);
 \end{tikzpicture}
 \end{document}