[Tex/LaTex] How to draw the unit hyperbola in LaTex

pgfplotstikz-pgf

I want to make a graph of the unit hyperbola, but I'm not sure how to make it appear using pgfplots. Basically, what I'm using is this:

\documentclass[12pt]{article}
\usepackage{pgfplots}

\begin{document}

\begin{tikzpicture}
\begin{axis}
    \addplot[blue,domain=0:2pi,samples=201]{(cosh(x))^2-(sinh(x))^2=1};
\end{axis}
\end{tikzpicture}

\end{document}

What I really want is the right-hand hyperbola with its asymptotes sketched, as well. Any ideas?

Best Answer

Here's something to get you started:

screenshot

% arara: pdflatex
% !arara: indent: {overwrite: yes}
\documentclass[tikz]{standalone}
\usepackage{pgfplots}

% axis style, ticks, etc
\pgfplotsset{every axis/.append style={
                    axis x line=middle,    % put the x axis in the middle
                    axis y line=middle,    % put the y axis in the middle
                    axis line style={<->}, % arrows on the axis
                    xlabel={$x$},          % default put x on x-axis
                    ylabel={$y$},          % default put y on y-axis
                    }}

% arrows as stealth fighters
\tikzset{>=stealth}

\begin{document}

\begin{tikzpicture}
    \begin{axis}[
            xmin=-5,xmax=5,
        ymin=-5,ymax=5]
        \addplot [red,thick,domain=-2:2] ({cosh(x)}, {sinh(x)});
        \addplot [red,thick,domain=-2:2] ({-cosh(x)}, {sinh(x)});
        \addplot[red,dashed] expression {x};
        \addplot[red,dashed] expression {-x};
    \end{axis}
\end{tikzpicture}

\end{document}