von Tina » Sa 4. Sep 2010, 14:15
danke, für die schnelle hilfe.
ich hab jetzt nur noch ein kleines problem, wenn ich eine etwas komplexere sinusfunktion zeichnen lassen will, da kriegt tikz die phasenverschiebung nicht hin.
\documentclass{scrreprt}
\usepackage[ngerman]{babel}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[domain=0:3.8]
\draw[step=1, very thin,color=gray] (-0.1,-1.1) grid (3.5,1.2);
%%Koordinatensystem
\draw[->] (-0.2,0) -- (3.8,0) node[right] {$x$};
\draw[->] (0,-1.2) -- (0,1.2) node[above] {$f(x)$};
%%Funktion
\draw[color=blue, samples=150] plot (\x,{0.5*sin(6*\x r-pi)}) node[right] {$f(x) = \sin x$};
%%x-achse beschriftung
\foreach \x in {1}
\draw(\x*pi,-1pt)--(\x*pi,1pt) node[below]{\x$ \cdot\pi$};
\foreach \x in {1}
\draw(\x/2*pi,-1pt)--(\x/2*pi,1pt) node[below]{$\frac{\x}{2}\cdot\pi$};
%%y-achse Beschriftung
\foreach \y in {-1,1}
\draw (-1pt,\y)--(1pt,\y) node[left]{\y};
\end{tikzpicture}
\end{document}
[/b]
danke, für die schnelle hilfe.
ich hab jetzt nur noch ein kleines problem, wenn ich eine etwas komplexere sinusfunktion zeichnen lassen will, da kriegt tikz die phasenverschiebung nicht hin.
[code]\documentclass{scrreprt}
\usepackage[ngerman]{babel}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[domain=0:3.8]
\draw[step=1, very thin,color=gray] (-0.1,-1.1) grid (3.5,1.2);
%%Koordinatensystem
\draw[->] (-0.2,0) -- (3.8,0) node[right] {$x$};
\draw[->] (0,-1.2) -- (0,1.2) node[above] {$f(x)$};
%%Funktion
\draw[color=blue, samples=150] plot (\x,{0.5*sin(6*\x r-pi)}) node[right] {$f(x) = \sin x$};
%%x-achse beschriftung
\foreach \x in {1}
\draw(\x*pi,-1pt)--(\x*pi,1pt) node[below]{\x$ \cdot\pi$};
\foreach \x in {1}
\draw(\x/2*pi,-1pt)--(\x/2*pi,1pt) node[below]{$\frac{\x}{2}\cdot\pi$};
%%y-achse Beschriftung
\foreach \y in {-1,1}
\draw (-1pt,\y)--(1pt,\y) node[left]{\y};
\end{tikzpicture}
\end{document}[/code][/b]