Created by
Torbjørn T.
| \documentclass{article}
\usepackage[landscape,margin=2mm]{geometry}
\usepackage{pgfplots}
\pgfplotsset{width=6cm,height=6cm,grid,no marks,
axis lines=middle,xmin=-5,xmax=5,ymin=-5,ymax=5,xtick={-5,-4,...,5},ytick={-5,-4,...,5}}
\begin{document}
\null\vfill
\hfill\begin{tikzpicture}
\begin{axis}
\addplot{x};
\end{axis}
\draw [red,thick] (current bounding box.south east) rectangle (current bounding box.north west);
\end{tikzpicture}\hfill
\begin{tikzpicture}
\begin{axis}[shorten >=-1cm,shorten <=-1cm]
\addplot{x};
\end{axis}
\draw [red,thick] (current bounding box.south east) rectangle (current bounding box.north west);
\end{tikzpicture}\hfill
\begin{tikzpicture}
\begin{axis}[enlargelimits={abs=1cm}]
\addplot{x};
\end{axis}
\draw [red,thick] (current bounding box.south east) rectangle (current bounding box.north west);
\end{tikzpicture}\hfill\null
\vfill
\end{document}
|