# Change Color of extra ticks grid

I got a nice an d tidy plot with the help of pgfplot using groupeplot. Now I want to insert some extra ticks with different color than the major grid...everything works pretty well except the color line of the grid...I know extra ticks are treated as major ticks and for those

 major grid style = {red}


would change the color. But I can't find something like

 extra grid style = {red}


in the manual. All I can actually find is

 extra tick line style={red}


which only changes the color of the label entry of the extra tick. Does anybody knows a tiny and beautiful workaround?

Thank in advance, CN

-

All the options that apply to ticks and grids can be specified separately for extra ticks by putting the options in extra tick style={...}. So if you want the major grid lines for the extra ticks to be red, you would set extra tick style={major grid style=red}:

\documentclass[border=5mm]{standalone}
\usepackage{pgfplots}

\begin{document}
\begin{tikzpicture}
\begin{axis}[
grid=both,
extra x ticks={1,3},
extra tick style={
major grid style=red,
tick align=outside,
tick style=red
}
]
\addplot [black, only marks] {rnd};
\end{axis}
\end{tikzpicture}
\end{document}

-
Thanks Jake, for this pretty fast and correct answer...So I was pretty close but still miles away..damn ;) –  CN19 Jul 6 '13 at 12:13
@user33304: it is better to accept the answer followed by up voting. –  stalking is prohibited Jul 6 '13 at 12:26
thanks for the advise...but upvoting requires a registration..and that's what it did right now ;) –  CN19 Jul 6 '13 at 13:02