# Axes for bivariate normal distribution with tikz

I got the following figure:

with this code:

\documentclass{standalone}
\usepackage{pgfplots}

\begin{document}

\def\centerx{2}
\def\centery{-1}
\begin{tikzpicture}
\begin{axis}
{exp(-( (x-\centerx)^2 + (y-\centery)^2)/3 )};
\node[circle,inner sep=1pt,fill=blue,pin=90:$\mu$]
at (axis cs:\centerx,\centery,1) {};
\end{axis}
\end{tikzpicture}
\end{document}


I wonder how to get this figure without some axes as below:

You probably want to use the axis lines options (see section 4.9.9 of the pgfplots manual).

\documentclass{standalone}
\usepackage{pgfplots}

\begin{document}

\def\centerx{2}
\def\centery{-1}
\begin{tikzpicture}
\begin{axis}[axis lines=left]
\node[circle,inner sep=1pt,fill=blue,pin=90:$\mu$]

• I added a picture to my original answer. The maximum value does not exceed 1, it only looks like it does because of the angle at which you see the picture. This optical illusion is just an artefact of your request. You could add the option view={0}{0} to the axis options to move the camera such that you look straight to the side, and you will see it is perfectly fine. – hugovdberg Feb 25 '14 at 17:23