# \pgfresetboundingbox is undefined control sequence?

I'm sure this question has a simple answer that I'm missing: I'm trying to use pgfplots to put two graphs right next to each other with no space in between. I thought I could do this by using the \pgfresetboundingbox command found in the manual. However, LaTeX gives me an undefined control sequence error on this command. What am I doing wrong?

\begin{tikzpicture}
\begin{axis}[
ylabel={$\hat{\delta}$},
xlabel={$x$}
]
\end{axis}
\pgfresetboundingbox
\end{tikzpicture}
\hspace{0cm}
\begin{tikzpicture}
\begin{axis}[
xlabel={$x$},
ytick=\empty
]
\end{axis}
\end{tikzpicture}

-
Welcome to TeX.SX. Please add a complete, compilable but minimal example that illustrates your problem. –  Martin Scharrer Mar 17 '11 at 2:21
Would be nice with a compilable example. However, with some dummy data your example compiles fine for me, perhaps you need to update PGF/PGFPLOTS. It doesn't give the output you wanted though, but what about removing the \pgfresetboundingbox and adding some negative hspace? Not ideal, but it may work. –  Torbjørn T. Mar 17 '11 at 2:21

Two approaches:

1. Include the axes in the same tikzpicture and place them using the axis nodes south east and south west, which lie on the corners of the axes.
2. Reset the bounding box as you suggested (probably after updating your pgf), then set the axis as the new bounding box.

Here's example code for both methods:

\documentclass{article}
\usepackage{pgfplots}

\begin{document}
\begin{tikzpicture}
\begin{axis}[anchor=south east,
width=5cm,
ylabel={$\hat{\delta}$},
xlabel={$x$}
]
\end{axis}
\begin{axis}[anchor=south west,
width=5cm,
xlabel={$x$},
ytick=\empty
]
\end{axis}
\end{tikzpicture}

\begin{tikzpicture}
\begin{axis}[
width=5cm,
ylabel={$\hat{\delta}$},
xlabel={$x$}
]
\end{axis}\pgfresetboundingbox
\useasboundingbox
(current axis.below south west)
rectangle (current axis.north east);
\end{tikzpicture}%
\begin{tikzpicture}
\begin{axis}[
width=5cm,
xlabel={$x$},
ytick=\empty
]