2
0
Fork 0
mirror of https://github.com/MartinThoma/LaTeX-examples.git synced 2025-04-19 11:38:05 +02:00

Slant text to arrow

This commit is contained in:
Martin Thoma 2016-07-13 15:00:23 +02:00
parent f4674abc32
commit 23462814aa
8 changed files with 16 additions and 13 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

View file

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

View file

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Before After
Before After

View file

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

View file

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Before After
Before After

View file

@ -1,15 +1,16 @@
\documentclass[varwidth=true, border=2pt]{standalone} \documentclass[varwidth=true, border=6pt]{standalone}
\usepackage{tikz} \usepackage{tikz}
\usetikzlibrary{shapes,snakes,shapes.geometric,positioning} \usetikzlibrary{shapes,snakes,shapes.geometric,positioning,decorations.text}
\begin{document} \begin{document}
\tikzstyle{arrow}=[bend left,->,very thick, line cap=round]
\begin{tikzpicture}[node distance=2cm] \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] (a) {Agent};
\node[ellipse,draw,minimum width=80pt,minimum height=20pt,fill=gray!5,below of=a] (u) {Umwelt}; \node[ellipse,draw,minimum width=80pt,minimum height=20pt,fill=gray!5,below of=a] (u) {Umwelt};
% Arrows % Arrows
\draw[bend left,->,very thick] (a.east) to node [auto] {Aktion $a_k$} (u.east); \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[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] (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{tikzpicture}
\end{document} \end{document}