# Centering Figure without re-scale [duplicate]

I would like to center a figure made on Tikz. This figure has a specific size which is wider than \textwidth, and it needs to be centered. All options I see use \resibox or \makebox to center the figures. But I don't want to change the figure size. Are there any option or command to allow this?

Thanks very much in advance. Kind regards,

German

=== SOLUTION == As Mr @David Carlisle commented below, the solution is uncomment the \makebox and set the scaling to 0pt as follow:

\begin{figure}[h!]
\centering
\newlength\figureheight
\newlength\figurewidth
\setlength\figureheight{6cm}
\setlength\figurewidth{1.2\linewidth}
\begingroup
\fontsize{8}{\baselinestretch}\selectfont
\makebox[0pt][c]{
\input{VoltFRFFreq.tikz}
%}
\endgroup
\caption{A plot of a sphere}
\label{fig.freq}
\end{figure}


Thanks again to all people!!

-- EDIT's --- P.D.-I forgot to mention I use XeLaTeX, I hope it helps. Kind regards, P.D.D- The code is

\begin{figure}[h!]
\centering
\newlength\figureheight
\newlength\figurewidth
\setlength\figureheight{6cm}
\setlength\figurewidth{1.2\linewidth}
\begingroup
\fontsize{8}{\baselinestretch}\selectfont
%\makebox[\figurewidth][c]{
\input{VoltFRFFreq.tikz}
%}
\endgroup
\caption{A plot of a sphere}
\label{fig.freq}
\end{figure}


## marked as duplicate by David Carlisle floats StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Jun 24 '16 at 19:19

uncomment your \makebox

  %\makebox[\figurewidth][c]{


but change the specified width to 0pt instead of \figurewidth

since your figure is wider than the text width, you want to make it look to latex like it is narrower. here's one possibility (just the group with the figure):

\noindent\hss
\begingroup
\fontsize{8}{\baselinestretch}\selectfont
\input{VoltFRFFreq.tikz}
\endgroup
\hss\par

• Hi Barbara The code you propose gives me an error: ! Infinite glue shrinkage found in a paragraph. I forgot to mention I use XeLaTeX, I hope it helps. Kind regards, – Germán Martínez Jun 24 '16 at 18:19
• david's answer is more "real latex". so go with that. this one could be salvaged by changing the \hss to something like \hskip -.15\linewidth (or, better, \hspace{-.15\linewidth}) but the latex \makebox with 0 width does the "right thing". xelatex doesn't matter in this situation. – barbara beeton Jun 24 '16 at 19:03