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


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:





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:


% arara: pdflatex
% !arara: indent: {overwrite: yes}

% 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


        \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};