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{axis}[xmax = 4, ymax = 4, samples = 50]
   \addplot[black, smooth,domain=0:1] {sqrt(1 - 4*(x - 1/2)^2};


enter image description here

closed as off-topic by siracusa, TeXnician, Phelype Oleinik, Stefan Pinnow, Mensch Nov 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.

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