1

This question already has an answer here:

First of all, this is complaining on a high level. pgfplots is a great package and I would like to acknowledged the work of Christian Feuersänger and other developers. Consider the minimal example below.

\documentclass{standalone}
\usepackage{filecontents}
\usepackage{pgfplots}
\usepackage{pgfplotstable}
\pgfplotsset{compat=newest}
\pgfkeys{/pgf/number format/set thousands separator = }

\begin{filecontents}{\jobname.dat}
N               l01             l06 
1.6000000e+01   2.3772638e-03   9.3626135e-01   
3.2000000e+01   5.9319990e-04   2.3388025e-01   
6.4000000e+01   1.4823007e-04   5.8468012e-02   
1.2800000e+02   3.7053144e-05   1.4616985e-02   
2.5600000e+02   9.2630106e-06   3.6542466e-03
5.1200000e+02   2.3157442e-06   9.1356170e-04   
1.0240000e+03   5.7880509e-07   2.2839043e-04   
2.0480000e+03   1.4436571e-07   5.7097582e-05   
4.0960000e+03   3.5634754e-08   1.4274236e-05
\end{filecontents}
\begin{document}
\begin{tikzpicture}
    \begin{loglogaxis}[
        xlabel={Anzahl der Punkte $N$},
        title={Fehler},
        legend entries={$\lambda_1$,$\lambda_2$},
        legend columns=2,
        legend pos=north east,
        xmin=1.0e1,
        xmax=1.0e4,
        ymax=2,
        ymin=1.0e-8,
        grid=major,
        enlarge y limits=.4,]
        \addplot+[only marks] table[x=N,y=l01] {\jobname.dat};
        \addplot+[only marks] table[x=N,y=l06] {\jobname.dat};
        \addplot[forget plot,red] table [
            x=N,
            y={create col/linear regression={y=l06,
            variance list={500,400,200,100}}}]  {\jobname.dat}
        coordinate [pos=0.1] (AA)
        coordinate [pos=0.4] (BB);
        \xdef\slopeB{\pgfplotstableregressiona} % save the slope parameter
        \draw (AA) -| (BB)  % draw the opposite and adjacent sides of the triangle
        node [pos=0.25,anchor=south] {1}    % label the horizontal line
        node [pos=0.75,anchor=west] {\pgfmathprintnumber[precision=2] {\slopeB}};
    \end{loglogaxis}
\end{tikzpicture}
\end{document}

With the following output:

Output

How can force pgfplots to plot minor yticks like in x-axis?

marked as duplicate by Jake pgfplots Feb 19 '15 at 18:38

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2

Adding the option:

 max space between ticks=20

solved the problem. Solution found in the link given by darthbith. Thanks.

Not the answer you're looking for? Browse other questions tagged or ask your own question.