PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Tikz



zac
29-03-2012, 19:02
kann mir jemand sagen, warum folgender code falsch plottet?


documentclass[a4paper]{scrartcl}
\usepackage[ansinew]{inputenc}
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage[a4paper,left=20mm,right=20mm, top=25mm, bottom=25mm]{geometry}

\begin{document}
\pagestyle{empty}
\begin{tikzpicture}
\begin{axis}[
ymin=-6,
ymax=6.5,
xmin=-0.4,
xmax=0.4,
xlabel= in m,
ylabel=Ver]

\addplot[red,no marks] {(0.08) / (x - 0.08)};


\end{axis}
\end{tikzpicture}
\end{document}

localghost
29-03-2012, 21:14
Zwei Änderungen schaffen Abhilfe.

\documentclass{scrartcl}
\usepackage[T1]{fontenc}
\usepackage{pgfplots}

\pagestyle{empty}

\begin{document}
\begin{tikzpicture}
\begin{axis}[
xmin=-0.4,
xmax=0.4,
xlabel={in m},
ylabel={Ver},
restrict y to domain=-6.5:6.5 % an Stelle konkreter Wertebereiche für y
]
\addplot[red,no marks,samples=1000] {(0.08)/(x-0.08)};
\end{axis}
\end{tikzpicture}
\end{document}
Details stehen in der Anleitung zu pgfplots (http://ctan.org/pkg/pgfplots).


Thorsten

zac
30-03-2012, 11:22
danke, so funktioniert das wunderbar!