Pgfplot は x ドメインを y ドメインに制限します。プロットが奇妙に見えます

Pgfplot は x ドメインを y ドメインに制限します。プロットが奇妙に見えます

次のように、小さな浮動小数点数 (0:0.12) と大きな整数 (100:100000) のセットの基本的な 2D グラフをプロットしようとしています。

\begin{tikzpicture}
\begin{axis}[
    domain=100:100000,
    title={Request time dependence on database record size},
    xlabel={Database Size [number of records]},
    ylabel={Time [seconds per average of 1000 requests]},
    xmin=100, xmax=1000000,
    ymin=0, ymax=0.13,
    xtick={100, 1000, 10000, 100000},
    ytick={0,0.0001,0.001,0.01, 0.1},
    legend pos=north west,
    grid style=dashed,
    restrict y to domain=0:1
]

\addplot[
    color=blue,
    mark=square,
    ]
    coordinates {
    (100,0.0004)(1000,0.002519528)(10000,0.0134010380006657)(100000,0.125218412)
    };
    \legend{CuSO$_4\cdot$5H$_2$O}

\end{axis}
\end{tikzpicture}

しかし、グラフはおかしく見えます (凡例は無視してください)。 ここに画像の説明を入力してください

X 軸に実際に必要な値を設定する方法について何かアイデアはありますか? (100、1000、10000、100000)

ありがとう

答え1

x軸をlogモードに変更するだけでなく(Torbjørn T.が提案したように)、質問の下にコメントしてください) 両方の軸にログ モードを使用することをお勧めします。それに加えて、グラフが表示されないようにするオプションがいくつかあるので、コメントしました。

% used PGFPlots v1.14
\documentclass[border=5pt]{standalone}
\usepackage{pgfplots}
    \pgfplotsset{compat=1.3}
\begin{document}
\begin{tikzpicture}
    \begin{loglogaxis}[
%        domain=100:100000,
        title={Request time dependence on database record size},
        xlabel={Database Size [number of records]},
        ylabel={Time [seconds per average of 1000 requests]},
        xmin=100, xmax=1000000,
        ymin=0, ymax=0.13,
%        xtick={100, 1000, 10000, 100000},
%        ytick={0,0.0001,0.001,0.01, 0.1},
        legend pos=north west,
%        grid style=dashed,
%        restrict y to domain=0:1,
    ]
        \addplot[
            color=blue,
            mark=square,
        ] coordinates {
            (100,0.0004)
            (1000,0.002519528)
            (10000,0.0134010380006657)
            (100000,0.125218412)
        };
        \legend{CuSO$_4\cdot$5H$_2$O}
    \end{loglogaxis}
\end{tikzpicture}
\end{document}

上記コードの結果を示す画像

関連情報