2

I'm trying to obtain this graph (made in Origin):

enter image description here

Both axes in log scale.

This is MWE:

\documentclass{standalone}
\usepackage{pgfplots}
\usepgfplotslibrary{units}
\begin{document}
    \begin{tikzpicture}
    \begin{axis}[
    ymode=log,
    xmode=log,
    log ticks with fixed point
    ]
\addplot table {
9   1.75439
14  0.71429
18  0.41667
19  0.33333
34  0.11765
};
\end{axis}
\end{tikzpicture}
\end{document}

enter image description here

The x-axis looks awful. What is the way to make it look like in Origin?

| improve this question | | | | |
  • 1
    Add xtick={10,15,...,35} and I have to say Origin is not pretty either. – percusse Mar 4 '15 at 9:28
2

You will have to define your x-ticks interval manually.

% arara: pdflatex

\documentclass{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.11}

\begin{document}
\begin{tikzpicture}
    \begin{axis}[%
        ,ymode=log
        ,xmode=log
        ,log ticks with fixed point
        ,xtick={10,15,...,35}
        ,minor xtick={1,...,40}
    ]
    \addplot table {
        9   1.75439
        14  0.71429
        18  0.41667
        19  0.33333
        34  0.11765
    };
    \end{axis}
\end{tikzpicture}
\end{document}

enter image description here

| improve this answer | | | | |
  • But what about extra-ticks between values? – saldenisov Mar 4 '15 at 9:57
  • 1
    minor xtick={10,...,35} – percusse Mar 4 '15 at 10:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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