I'm plotting a function with the following code:
\documentclass[]{article}
\usepackage{tikz, pgfplots}
\begin{document}
\newcommand{\F}{(x-5)*(x-4)*(x-2)*(x+1)*(x+2)*(x+4)}
\newcommand{\G}{(x-3)*(x-3)*(x-1)*(x+3)}
\begin{tikzpicture}
\begin{axis}[
axis lines*=middle,
enlarge y limits=true,
enlarge x limits=false,
restrict x to domain=-5:5,
restrict y to domain=-60:60]
\addplot [thick, samples=50, smooth] {(\F)/(\G)};
\end{axis}
\end{tikzpicture}
\end{document}
I would specifically like to emphasise the vertical asymptotes of this function, like the example underneath does. (Preferably, I would like to add axes without ticks.) How can I do that? I've been playing around with the domains for hours, but I didn't get a satisfying result.



axis csis the default coordinate system. So you can simplify it to e.g.\draw[dashed] (1,-50) -- (1,+50);– Tom Bombadil Dec 05 '15 at 10:08compatis set (to version 1.11 or newer). If you try your example without\pgfplotsset{compat=1.12}you'll see this quite clearly. – Torbjørn T. Dec 05 '15 at 14:33