How to remove extreme labels on each axis ?
Why does the shape of the curve is not limited to the upper edge of the grid ?
I find that the curve is not very smooth, especially at the apex of the parabola. I am a user Metapost, and I do not have this trouble if I draw the same curve.
\documentclass[11pt,a4paper]{article}
\usepackage{geometry}
\geometry{margin=1in}
\usepackage{tikz}
\usepackage{tkz-euclide}
\usetikzlibrary{calc,shapes.misc}
\usepackage{pgfplots}
\pgfplotsset{compat=1.8}
\begin{document}
\begin{center}
\begin{tikzpicture}
\begin{axis}[
restrict x to domain=-3:3, xmax=3, xmin=-3,
restrict y to domain=-3:5, ymax=5, ymin=-3,
x=1cm,
y=1cm,
axis lines=middle,
line width = 0.35mm,
xtick={-3,-2,-1,0,1,2,3},
ytick={-3,-2,-1,0,1,2,3,4,5},
grid=major,
>=stealth,
compat=newest,
x label style={at={(axis description cs:0.98,0.32)},anchor=south},
y label style={at={(axis description cs:0.5,0.98)},rotate=-90,anchor=east},
xlabel={$x$},
ylabel={$y$},
]
\addplot [red,line width=1,smooth,domain=-3:3] {2*x^2-x-2} ;
\node[below right] at (1,-1){A};
\node[below left] at (0,0){$0$};
\node[fill=red,circle,scale=0.3] at (1,-1){};
\end{axis}
\end{tikzpicture}
\end{center}
\end{document}
samples=300
, you solved a problem. In terms of extreme labels, I want to remove -3 and 3 on the x-axis and -3 and 5 and the y-axis.