二维绘图的问题

二维绘图的问题

当我在 python 中编译此代码时,我得到以下输出,从大到小排序:

在此处输入图片描述

另一方面,当我在 latex 中编译它时,我得到了以下反转的输出。发生了什么?你能帮我一下吗?

--我还想知道如何在轴上放置百分比--

在此处输入图片描述

\documentclass{standalone}
\usepackage{subcaption}
\usepackage{caption}
\usepackage{pgfplots, pgfplotstable}
\usetikzlibrary{positioning}
\pgfplotsset{compat=1.16,width=0.98\textwidth}
%\pgfplotsset{compat=1.16,width=0.98\textwidth}

\usepackage{tikz}
\usepackage[english,spanish]{babel}         % multilenguaje

% grid style

\pgfdeclareplotmark{mystar}{
    \node[star,star point ratio=2.25,minimum size=6pt,
    inner sep=0pt,draw=black,solid,fill=red] {};
}

\decimalpoint

\begin{document}
    
    \begin{tikzpicture}
    
    
    
    \begin{axis}[
    axis line style={black},
    legend cell align={left},
    legend style={at={(0.45,0.97)}, anchor=north west, draw=black},
    tick align=outside,
    x grid style={dashed,black!60},
    xlabel={Porcentaje de entrenamiento},
    xmajorticks=true,
    xmin=10, xmax=90,
    xtick style={color=black},
    y grid style={dashed,black!60},
    ylabel={RMSE},
    ymajorticks=true,
    ymin=0.90694, ymax=1.08646,
    ytick style={black},
    xtick align=inside,
    ytick align=inside,
    grid = both
    ]
    \addplot [mark =+,line width=1pt,blue, mark size=1.5pt,dashed]
    table {%
90 0.9508
80 0.9361
70 0.9423
60 0.9423
50 0.9439
40 0.9501
30 0.9607
20 0.9699
10 1
};
\addlegendentry{Baseline}
\addplot [mark =pentagon,line width=1pt,black, mark size=1pt]
table {%
90 0.9371
80 0.9242
70 0.937
60 0.9383
50 0.9493
40 0.9649
30 0.9976
20 1.0421
10 1.0783
};
\addlegendentry{Memory}
\addplot [mark =o,line width=1pt,green!80!black, mark size=1pt]
table {%
90 0.927
80 0.9151
70 0.9309
60 0.9364
50 0.945
40 0.9609
30 0.9759
20 0.9868
10 1.0122
};
\addlegendentry{Model}
\end{axis}

\end{tikzpicture}

\end{document}

相关内容