答案1
我尝试了与和semilogxaxis
相结合的环境,这就是我得到的结果。如果它适合您的目的,请告诉我。xtick
xticklabels
\documentclass[border=5pt, tikz]{standalone}
\usepackage{pgfplots}
\usepackage{filecontents}
\pgfplotsset{compat=newest}
\begin{filecontents}[overwrite]{test.txt}
x y
0.00390625 0.25
0.0078125 0.26
0.015625 0.27
0.03125 0.28
0.0625 0.29
0.125 0.28
0.25 0.27
0.5 0.26
1 0.25
\end{filecontents}
\begin{document}
\begin{tikzpicture}
\begin{semilogxaxis}[
xtick={0.01,0.02,0.04,0.08,0.16,0.32},
xticklabels={0.01,0.02,0.04,0.08,0.16,0.32},
]
\addplot[
mark=o,
color=blue]
table[
x=x,
y=y,
]
{test.txt};
\end{semilogxaxis}
\end{tikzpicture}
\end{document}