I want to add minor distance between y ticks. The default distance is 0.5, I need to set for 0.2. It seems easy to set different space for ticks according to pgfplots, in 4.15, page 271.
I add the suggested ytick={\foreach \y in {.2,.4,.6}{\y}, varying to get results, but I couldn't. Help me, please.
My code graph is, with \usepackage{tikz} and \usepackage{pgfplots}, in the preamble:
\begin{figure}[!h]
\centering
\caption{Rigidez Efectiva para Columnas Rectangulares}
\begin{tikzpicture}[domain=0:.7]
\begin{axis}[xlabel={$P/A_{g}f'{c}$},ylabel={$EI_{ef}/EI_{g}$}, xmin=-.1,xmax=.7,ymin=0,ymax=1.4, ytick={\foreach \y in {.2,.4,.6}{\y}}]
\addplot[domain=-.1:.1,color=red,very thick]{.3};
\addplot[domain=.1:.5,color=red,very thick]{.2+\x};
\addplot[domain=.5:.7,color=red,very thick]{.7};
\end{axis}
\end{tikzpicture}
\end{figure}

\foreachis not needed in tick specification. Simply useytick={0.2,0.4,0.6}and it works as expected. – Paul Gessler Apr 02 '14 at 19:28\foreachcommand? – Isai Apr 02 '14 at 19:33ytick={.2,.4,...,1.2}– Isai Apr 02 '14 at 19:34\foreachis used very rarely; the mention of\foreachin 4.15.1 of the manual is telling you how the ticks are created internally (details ofpgfplotsimplementation). The examples in the bulleted list show typical usage and the behavior of dots. – Paul Gessler Apr 02 '14 at 19:35pgfplotsimplementation. What will the results be in the graph? – Isai Apr 02 '14 at 21:09