2

I am trying to use standalone package along with tikzpicture. The resulting document is not cropped properly although I used the class option of crop=true. Could someone help me?

Here is the code I used:

\documentclass[crop=true, border=0mm]{standalone}
\usepackage{pgfplots}

\begin{document}

    \begin{tikzpicture}
        \begin{axis}[
            axis on top,
            title = {$\omega_\phi\left(x, \sigma\right) = \frac{\Gamma}{\pi{R_c}^2}\exp\left[-\frac{\left(x-x_0\right)^2+\left(\sigma-R_0\right)^2}{{R_c}^2}\right]$},
            xmin=2, xmax=3,
            ymin=2, ymax=3,
            view={0}{90},
            xlabel = {$x$},
            ylabel = {$\sigma$},
            ]
            \addplot3[
                contour gnuplot = {contour label style={nodes={text=black}}},
                samples=10,
                contour/draw color={black},
                ]
                {1/3.1415927/0.25^2*exp(-((x-2.5)^2+(y-2.5)^2)/0.25^2)};
        \end{axis}
    \end{tikzpicture}

\end{document}

The result of compiling is the following picture. I put a red box around the document to show the white space in the right of the document. I put it manually and it is not something that the above code creates.:enter image description here

0 Answers0