\documentclass[border=10pt]{standalone} \usepackage{pgfplots} \pgfplotsset{width=10cm, compat=1.9} \begin{document} \begin{tikzpicture} \begin{axis}[ %axis lines=both, xlabel=$x$, ylabel=$f(x)$ ] \addplot[ color=red, domain=-10:10, samples=10, mark=* ]{x^2-2*x-1}; \addlegendentry{$x^2-2x-1$} \addplot[ color=blue, domain=-10:10, samples=10, mark=square %pentagon%square ]{x^2+2*x-1}; \addlegendentry{$x^2+2x-1$} \end{axis} \end{tikzpicture} \end{document}