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.:
standaloneversionstandalone 2012/09/15 v1.1b. – Mar 03 '13 at 06:18standalonepackage tostandalone 2012/09/15 v1.1band it worked perfectly. Thanks. – shashashamti2008 Mar 03 '13 at 09:25\end{document}it will also work with older versions ofstandalone. – Martin Scharrer Mar 04 '13 at 18:23