I would like to center the plot in the following code. How can I do that without changing the dimensions of the page for the parts containing text ?
I must keep the dimensions of the plot as it without scaling the plot.
\documentclass[a4,12pt]{article}
\usepackage[utf8x]{inputenc}
\usepackage{tikz}
\usepackage{pgf,tikz}
\usetikzlibrary{arrows}
\begin{document}
\begin{center}
\definecolor{cqcqcq}{rgb}{0.75,0.75,0.75}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=2.0cm,y=2.0cm]
\draw [color=cqcqcq,dash pattern=on 4pt off 4pt, xstep=2.0cm,ystep=2.0cm] (-3.39,-4.23) grid (5.49,4.35);
\draw[->,color=black] (-3.39,0) -- (5.49,0);
\foreach \x in {-3,-2,-1,1,2,3,4,5}
\draw[shift={(\x,0)},color=black] (0pt,2pt) -- (0pt,-2pt) node[below] {\footnotesize $\x$};
\draw[->,color=black] (0,-4.23) -- (0,4.35);
\foreach \y in {-4,-3,-2,-1,1,2,3,4}
\draw[shift={(0,\y)},color=black] (2pt,0pt) -- (-2pt,0pt) node[left] {\footnotesize $\y$};
\draw[color=black] (0pt,-10pt) node[right] {\footnotesize $0$};
\clip(-3.39,-4.23) rectangle (5.49,4.35);
\end{tikzpicture}
\end{center}
\end{document}
\paperwidthand the equation is very simple to calculate with eTeX. If it was a picture or photograph I would push to the edge of the paper rather than center it. – yannisl Jan 30 '12 at 22:15