# 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:

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

\begin{document}

\begin{tikzpicture}
\begin{axis}
\end{axis}
\end{tikzpicture}

\end{document}


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

• I have made a tutorial in my answer here. – kiss my armpit Feb 6 '14 at 17:37
• You are plotting a constant valued function? – kiss my armpit Feb 6 '14 at 17:45
• You can get a plot out of the above MWE with: 1. Delete the =1 and use 2*pi instead of 2pi. Don't think this is the function you were looking for though. – Peter Grill Feb 6 '14 at 18:22

Here's something to get you started: % 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]
\end{axis}
\end{tikzpicture}

\end{document}


With PSTricks just for fun.

\documentclass[pstricks,border=12pt,12pt]{standalone}
\usepackage{pst-math,pst-plot}

\begin{document}
\begin{pspicture}(-6,-6)(6.5,6.5)
\psaxes{->}(0,0)(-6,-6)(6,6)[$x$,0][$y$,90]
\psset{algebraic,linewidth=2pt}
\foreach \expr/\clr in {SINH(t)|COSH(t)/red,COSH(t)|SINH(t)/green,SINH(t)|-COSH(t)/blue,-COSH(t)|SINH(t)/orange}
{\psparametricplot[linecolor=\clr]{-2}{2}{\expr}}
\end{pspicture}
\end{document} 