# Centering not working on pdf/tikz plot! [closed]

I have looked at other posts regarding how to center a "figure." To be clear, I want to center the plot in the center of the document.

I have followed the advice of many to use "\centering." However, I placed it in several locations (the one shown is one among them), and it has not centered the plot. What am I doing wrong?

\begin{tikzpicture}
\begin{axis}[xmax = 4, ymax = 4, samples = 50]
\centering
\addplot[black, smooth,domain=0:1] {sqrt(1 - 4*(x - 1/2)^2};
\end{axis}
\end{tikzpicture}


Result:

## closed as off-topic by siracusa, TeXnician, Phelype Oleinik, Stefan Pinnow, MenschNov 30 '18 at 15:31

• This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

• Hi, \centering needs to go before \begin{tikzpicture} – user121799 Nov 7 '18 at 19:16
• Perfect. Thank you marmot. I did not want to keep pestering you with questions. :P – Rafael Vergnaud Nov 7 '18 at 19:17
• @marmot Do you want to add an answer? – siracusa Nov 8 '18 at 22:09
• I'm voting to close this question as off-topic because it was solved in the comments – siracusa Nov 30 '18 at 14:49