# center plot function with tikzpicture

I've to plot this function: y=-0.002822*x^2 + 1.456*x - 89.314 in the x domain between 75 and 200, and y domain between 0 to 100. If I use

\begin{tikzpicture}
\begin{axis}[xmin=75,ymin=0]
\end{axis}
\end{tikzpicture}


It gives back an empty graph.

• Have you tried xmin=75,xmax=200,ymin=0,ymax=100,domain=75:200? (in other words, writing in pgfplots what you said in text...). And please, make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. – Rmano Jul 6 '16 at 14:18
• ok it works, ty. – Motosega Jul 6 '16 at 14:19
• The default domain is -5:5. – Torbjørn T. Jul 6 '16 at 15:19

These are the default values for domain, y range and x range in pgfplots:

\documentclass[border=10pt]{standalone}
\usepackage{tikz}
\usepackage{pgfplots}\pgfplotsset{compat=1.13}
\usetikzlibrary{arrows.meta,positioning,calc}
\begin{document}
\begin{tikzpicture}[
]
\begin{axis}[
]
\end{axis}
\end{tikzpicture}
\end{document}


If you want different things, just specify them:

\documentclass[border=10pt]{standalone}
\usepackage{tikz}
\usepackage{pgfplots}\pgfplotsset{compat=1.13}
\usetikzlibrary{arrows.meta,positioning,calc}
\begin{document}
\begin{tikzpicture}
\begin{axis}[xmin=75, xmax=200,
ymin=0,ymax=100,
domain=75:200]
\end{axis}
\end{tikzpicture}
\end{document}


Notice that the default for x and y range is to autoscale them, so really you could just say, setting just your domain:

\begin{tikzpicture}
\begin{axis}[
domain=75:200]