von Mr.Goonie » Mo 13. Jul 2015, 08:50
Hallo sudo, vielen Dank für Deine Hilfe.
Ich habe das jetzt so gemacht und es scheint auch zu funktionieren:
\documentclass[a4paper]{report}
\usepackage{xcolor}
\usepackage{pgfplots}
\usepackage{tikz}
\pgfplotsset{compat=1.12}
\begin{document}
\begin{figure}[!h]
\begin{tikzpicture}
\begin{axis}[width=\textwidth, height=0.5\textwidth,
xlabel=$\bar{h}_{ab}$,
ylabel=$T$,
domain=0:2*pi, samples=100,
ymin=0,ymax=2,
xmin=0, xmax=6.3,
xtick={0,1.5708,3.14159,4.7123889,6.3},
xticklabels={$0$,$\frac{\pi}{2}$,$\pi$,$\frac{3\pi}{2}$,$2\pi$},
colorbar horizontal, colormap={color}{rgb255(0cm)=(255,0,180); rgb255(1cm)=(0,255,255); rgb255(3cm)=(100,255,0)}, colorbar style={hide axis}
]
\addplot [mark=none]{1-0.17*cos(deg(x)-30)+0.24*cos(2*deg(x))+0.32*cos(3*deg(x)+6)-0.2*cos(4*deg(x)-63};
\node [coordinate,pin = {[rotate=0]right:Orange}] at (axis cs:1.39,0.55) { };
\node [coordinate,pin = {[rotate=0]left:Gelbgr\"un}] at (axis cs:2.5,1.42) { };
\node [coordinate,pin = {[rotate=0]left:Cyan}] at (axis cs:4.1,1.61) { };
\node [coordinate,pin = {[rotate=0]left:Violettblau}] at (axis cs:5.1,0.34) { };
\node [coordinate,pin = {[rotate=0]left:Magenta}] at (axis cs:6,1.47) { };
\end{axis}
\end{tikzpicture}
\caption{blblblb}
\label{plot:t blabla}
\end{figure}
\end{document}
Ist der Code so sauber? Es erscheint jedenfalls keine Fehlermeldung
Falls ja, muss ich nur noch an der richtigen Farbpositionierung tüfteln...
Hallo sudo, vielen Dank für Deine Hilfe.
Ich habe das jetzt so gemacht und es scheint auch zu funktionieren:
[code]
\documentclass[a4paper]{report}
\usepackage{xcolor}
\usepackage{pgfplots}
\usepackage{tikz}
\pgfplotsset{compat=1.12}
\begin{document}
\begin{figure}[!h]
\begin{tikzpicture}
\begin{axis}[width=\textwidth, height=0.5\textwidth,
xlabel=$\bar{h}_{ab}$,
ylabel=$T$,
domain=0:2*pi, samples=100,
ymin=0,ymax=2,
xmin=0, xmax=6.3,
xtick={0,1.5708,3.14159,4.7123889,6.3},
xticklabels={$0$,$\frac{\pi}{2}$,$\pi$,$\frac{3\pi}{2}$,$2\pi$},
colorbar horizontal, colormap={color}{rgb255(0cm)=(255,0,180); rgb255(1cm)=(0,255,255); rgb255(3cm)=(100,255,0)}, colorbar style={hide axis}
]
\addplot [mark=none]{1-0.17*cos(deg(x)-30)+0.24*cos(2*deg(x))+0.32*cos(3*deg(x)+6)-0.2*cos(4*deg(x)-63};
\node [coordinate,pin = {[rotate=0]right:Orange}] at (axis cs:1.39,0.55) { };
\node [coordinate,pin = {[rotate=0]left:Gelbgr\"un}] at (axis cs:2.5,1.42) { };
\node [coordinate,pin = {[rotate=0]left:Cyan}] at (axis cs:4.1,1.61) { };
\node [coordinate,pin = {[rotate=0]left:Violettblau}] at (axis cs:5.1,0.34) { };
\node [coordinate,pin = {[rotate=0]left:Magenta}] at (axis cs:6,1.47) { };
\end{axis}
\end{tikzpicture}
\caption{blblblb}
\label{plot:t blabla}
\end{figure}
\end{document}
[/code]
Ist der Code so sauber? Es erscheint jedenfalls keine Fehlermeldung ;)
Falls ja, muss ich nur noch an der richtigen Farbpositionierung tüfteln...