Using pgfplots, I want to have grid lines similar to GeoGebra's. That is four minor ticks in between major ticks and a lighter color for the minor grid lines:
With the help of this post, I managed to get this code
\documentclass[margin=0.5cm]{standalone}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
axis lines=center,
grid=both,
xtick distance=1,
ytick distance=1,
xmin=-3.5,
xmax=3.5,
ymin=-3.5,
ymax=3.5,
x=1cm,
y=1cm,
xlabel={$x$},
ylabel={$y$},
xlabel style={right},
ylabel style={above},
minor tick num=4,
every minor tick/.style={minor tick length=0pt}
]
\end{axis}
\end{tikzpicture}
\end{document}
which produces the following result:
However, this still doesn't quite look like the grid lines from GeoGebra. Is there a way to have separate colors for the major and minor grid lines?
Thank you for any help in advance!


