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?

  • I have made a tutorial in my answer here. Feb 6, 2014 at 17:37
  • 1
    You are plotting a constant valued function? Feb 6, 2014 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. Feb 6, 2014 at 18:22

2 Answers 2


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


With PSTricks just for fun.


    \foreach \expr/\clr in {SINH(t)|COSH(t)/red,COSH(t)|SINH(t)/green,SINH(t)|-COSH(t)/blue,-COSH(t)|SINH(t)/orange}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .