von iTob » Sa 23. Okt 2010, 17:30
Nabend,
das löst das Problem zwar nicht, umgeht es aber, indem die Polstellen einfach nicht geplottet werden, sondern der Graph in drei Teilen:
\documentclass{scrartcl}
\usepackage{tikz}
\usetikzlibrary{arrows}
\begin{document}
\begin{tikzpicture}[>=triangle 45]
\draw[->,color=black] (-5,0) -- (5,0);
\foreach \x in {-4,-3,-2,-1,1,2,3,4}
\draw[shift={(\x,0)},color=black] (0pt,2pt) -- (0pt,-2pt) node[below] {\footnotesize $\x$};
\draw[->,color=black] (0,-5) -- (0,5);
\foreach \y in {-4,-3,-2,-1,1,2,3,4}
\draw[shift={(0,\y)},color=black] (2pt,0pt) -- (-2pt,0pt) node[left] {\footnotesize $\y$};
\clip(-5,-5) rectangle (5,5);
%\draw[smooth,samples=500,domain=-5:5, line width=2pt, color=red] plot(\x,{\x^2/(1-\x^2)});
\draw[smooth,samples=500,domain=-5:-1] plot(\x,{\x^2/(1-\x^2)});
\draw[smooth,samples=500,domain=-0.95:0.95] plot(\x,{\x^2/(1-\x^2)});
\draw[smooth,samples=500,domain=1.1:5] plot(\x,{\x^2/(1-\x^2)});
\end{tikzpicture}
\end{document}
Gibt aber hoffentlich auch noch eine automatische Lösung? Wär’ ja schon hilfreich, wen sowas öfter vorkommt...
Grüße,
Tobi
Nabend,
das löst das Problem zwar nicht, umgeht es aber, indem die Polstellen einfach nicht geplottet werden, sondern der Graph in drei Teilen:
[code]\documentclass{scrartcl}
\usepackage{tikz}
\usetikzlibrary{arrows}
\begin{document}
\begin{tikzpicture}[>=triangle 45]
\draw[->,color=black] (-5,0) -- (5,0);
\foreach \x in {-4,-3,-2,-1,1,2,3,4}
\draw[shift={(\x,0)},color=black] (0pt,2pt) -- (0pt,-2pt) node[below] {\footnotesize $\x$};
\draw[->,color=black] (0,-5) -- (0,5);
\foreach \y in {-4,-3,-2,-1,1,2,3,4}
\draw[shift={(0,\y)},color=black] (2pt,0pt) -- (-2pt,0pt) node[left] {\footnotesize $\y$};
\clip(-5,-5) rectangle (5,5);
%\draw[smooth,samples=500,domain=-5:5, line width=2pt, color=red] plot(\x,{\x^2/(1-\x^2)});
\draw[smooth,samples=500,domain=-5:-1] plot(\x,{\x^2/(1-\x^2)});
\draw[smooth,samples=500,domain=-0.95:0.95] plot(\x,{\x^2/(1-\x^2)});
\draw[smooth,samples=500,domain=1.1:5] plot(\x,{\x^2/(1-\x^2)});
\end{tikzpicture}
\end{document} [/code]
Gibt aber hoffentlich auch noch eine automatische Lösung? Wär’ ja schon hilfreich, wen sowas öfter vorkommt...
Grüße,
Tobi