[Tex/LaTex] Millimetric grid under PGFPlots graph


I'd like to recreate a plot that I found on a book for my students. The plot has a grid (1 mm x 1 mm) and above it, the axis and the function graph.

I'm having trouble creating the grid, which has some emphasis every 5 mm. I assume I have to use minor grid style and major grid style to set the colors for the grid and it's emphasis.

So, how can I set the grid to have 1 mm by 1 mm divisions? I'd like to point out that setting "ticks" give me little black lines on the axis, which I do not want, only the grid.

Here's my MWE:


\usepackage{tikz,tikz-3dplot} %Para fazer desenhos


\begin{axis}    [
axis lines = {center},
%width = {0.6\linewidth},
ylabel = {$y$},
xlabel = {$x$},
ytick distance = {2},
xtick distance = 1,
major grid style={gray},
minor grid style={lightgray},

\addplot    [
mark = none, domain= -1:5, smooth %samples at = {-1,0,1,2,3,4,5}
{x^2 -5*x + 6};

\addplot    [
coordinates {(2.5,-0.25)};

And here's the image I'm trying to base myself on. I know the function in the MWE isn't the same as the image, but it's just a reference for the grid. My idea is to have some examples of functions and also some instances with only the axis and grid, so the students can build the plots:
enter image description here

Best Answer

as pure tikz picture:

enter image description here

\documentclass[tikz, margin=3mm]{standalone}


% grid
\draw[     thin,brown!25]   (-2,-2) grid[step= 1mm] ++ (8,15);
\draw[semithick,brown!50]   (-2,-2) grid[step= 5mm] ++ (8,15);
\draw[    thick,brown!75]   (-2,-2) grid[step=10mm] ++ (8,15);
% axis
\draw[-Stealth] (0,-1) -- (0,11) node[below right] {$y$};
\draw[-Stealth] (-1,0) -- (5, 0) node[below  left] {$x$};
\foreach \i in {1,...,4}{\draw (\i,1mm) -- + (0,-2mm) node[below] {\i};}
\foreach \i in {2,4,...,10}{\draw (1mm,\i) -- + (-2mm,0) node[ left] {\i};}
% curve
\draw[very thick, red]  plot[domain= -1:5] (\x, \x*\x - 5*\x + 6);
\draw                   plot[mark=*]    coordinates {(2.5,-0.25)};