Tikz、pgfplots。Y 值较小且偏移。y 轴的轴范围几乎为空;将其放大(它是 [1.0019165000000000:1.0019165000000000])

Tikz、pgfplots。Y 值较小且偏移。y 轴的轴范围几乎为空;将其放大(它是 [1.0019165000000000:1.0019165000000000])
    \begin{tikzpicture}
        \begin{axis}[xmode = log, axis line style = thick,
            xlabel=$X$, ylabel=$Y$]
            \addplot [color=black, thick] table [x=X, y=Y, col sep=comma] {data.csv};
        \end{axis}
    \end{tikzpicture}

尝试了几次之后,并没有得到需要的剧情:

在此处输入图片描述

使用 matplotlib 绘制它给了我所需的设计:在此处输入图片描述

我尝试过缩放:

\documentclass{article}
\usepackage{pgfplots}
\usepackage{xfp}

\begin{document}
\begin{tikzpicture}
    \begin{axis}[yticklabel={\pgfmathprintnumber[precision=16,fixed zerofill]{\fpeval{\tick/1e16-1.0019165}}},
        axis line style = thick, xmode = log,
        xlabel=$X$, ylabel=$Y$]
        \addplot [color=black, thick] table [x=x,y expr={\fpeval{(\thisrow{y}+1.0019165)*1e16}}] {%
        x y
        1e-18 1.0019165404591182
        1.914481976169954e-18 1.0019165404591113
        3.665241237079641e-18 1.0019165404591128
        7.017038286703837e-18 1.0019165404591102
        1.3433993325988987e-17 1.00191654045911
        2.5719138090593366e-17 1.0019165404591122
        4.923882631706752e-17 1.0019165404591108
        9.426684551178854e-17 1.001916540459112
        1.8047217668271666e-16 1.0019165404591128
        3.4551072945922183e-16 1.0019165404591106
        6.61474064123016e-16 1.0019165404591135
        1.2663801734674023e-15 1.0019165404591093
        2.424462017082331e-15 1.001916540459111
        4.641588833612772e-15 1.00191654045911
        8.886238162743407e-15 1.001916540459111
        1.7012542798525857e-14 1.0019165404591126
        3.257020655659783e-14 1.001916540459114
        6.235507341273925e-14 1.0019165404591128
        1.1937766417144357e-13 1.0019165404591142
        2.2854638641349837e-13 1.0019165404591168
        4.37547937507418e-13 1.0019165404591264
        8.376776400682925e-13 1.0019165404590593
        1.6037187437513276e-12 1.0019165405079609
        3.0702906297578498e-12 1.001916540505173
        5.878016072274924e-12 1.0019165405006747
        1.1253355826007646e-11 1.0019165404915105
        2.1544346900318777e-11 1.001916540476818
        4.124626382901348e-11 1.0019165404879324
        7.896522868499732e-11 1.0019165404892196
        1.51177507061566e-10 1.0019165404916082
        2.8942661247167517e-10 1.0019165404859571
        5.54102033000948e-10 1.001916540483839
        1.0608183551394483e-09 1.0019165404616543
        2.0309176209047387e-09 1.0019165403736476
        3.888155180308085e-09 1.0019165406085981
        7.443803013251696e-09 1.0019165407184398
        1.4251026703029963e-08 1.001916540935877
        2.7283333764867695e-08 1.0019165413696205
        5.2233450742668324e-08 1.0019165421150569
        1e-07 1.0019165435867632
        };
    \end{axis}
\end{tikzpicture}
\end{document}

但这并不能给出正确的结果:

在此处输入图片描述

相关内容