Cómo controlar la altura con precisión de dos gráficos independientes con exponente

Cómo controlar la altura con precisión de dos gráficos independientes con exponente

Usé el paquete pgfplots para dibujar dosser únicoparcelas. Quiero estas dos parcelas con la misma altura pero fallé.

Aquí está la imagen que se muestra en mi artículo. imagen mostrada en papel Como ves, el derecho está un poco más alto que el izquierdo.

He probado estas cosas:

  1. Usar scaled x ticks=false. Este problema se puede resolver con este método. Sin embargo, el número es demasiado cercano, que es lo que no me gustaría. Sospecho que es causado por el exponente. Entonces probé 2. a continuación.

  2. mover el exponente a otros lugares mediante

    every x tick scale label/.style={ at={(rel axis cs:0.9,-0.2)} }

    Sin embargo, este problema no se puede resolver. Todavía no tienen la misma altura.

El código de la trama de la izquierda:

\usepackage{pgfplots, pgfplotstable}
\pgfplotsset{compat=1.16}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{mathpazo}

\begin{document}
\pgfplotstableread[col sep=&, header=true]{
noise level   &rmse    &mean error
0             &13.8735 &5.4890
0.001         &14.8757 &5.6138
0.002         &16.6551 &5.8121
0.003         &18.1159 &6.0338
0.004         &20.0011 &6.2824
0.005         &21.9840 &6.5650
0.006         &23.8113 &6.8693
0.007         &25.8505 &7.1813
0.008         &27.4285 &7.5026
0.009         &29.4434 &7.8572
0.01          &31.1316 &8.2160
}\datatableentry



\begin{tikzpicture}
\begin{axis}[
  major grid style={line width=.5pt,draw=gray!50},
  title={\quad},
  xtick ={0.000,0.002,...,0.010},
  minor xtick ={0.001,0.003,...,0.01},
  ymajorgrids,
%  yminorgrids,
  xtick pos=left,
  ytick pos=left,
  scaled x ticks=true,
  ymin=0,
  xmin=0,
  xmax=0.01,
  ymax=40,
  legend style={legend pos= north west, legend cell align=left},
  mark size=2,
  xlabel={$p$},
  ylabel={Value (m)},
  tick scale binop=\times,
  semithick,
  height=5cm,
  mark repeat={2},
  every  x tick scale label/.style={
    at={(rel axis cs:0.9,-0.2)},overlay
  },
]
% red,gray,yellow,green,lime,black,red,blude,cyan
\addlegendentry{RMSE};
\addplot [color=orange,thick,mark=o] table [y=rmse, x=noise level] {\datatableentry};
\addlegendentry{mean error};
\addplot [color=cyan,thick,mark=diamond] table [y=mean error, x=noise level] {\datatableentry};
\end{axis}
\end{tikzpicture}
\end{document}

El código de la trama correcta.

\documentclass{standalone}
\usepackage{pgfplots, pgfplotstable}
\pgfplotsset{compat=1.16}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{mathpazo}

\begin{document}
\pgfplotstableread[col sep=&, header=true]{
noise level   &rmse    &mean error
0             &13.8735 &5.4890
0.2           &13.8491 &5.4878
0.4           &14.1604 &5.5624
0.6           &14.2584 &5.6174
0.8           &14.5146 &5.7072
1.0           &15.0029 &5.8409
1.2           &14.9655 &5.9318
1.4           &15.2164 &6.0813
1.6           &15.5703 &6.2642
1.8           &15.9604 &6.4683
2.0           &16.4144 &6.7071
2.2           &16.8802 &6.9842
2.4           &17.6332 &7.3055
2.6           &18.2558 &7.6403
2.8           &19.1625 &8.0250
3.0           &19.9934 &8.4352
}\datatableentry



\begin{tikzpicture}
\begin{axis}[
  %grid style={line width=.1pt, draw=gray!20},
  major grid style={line width=.5pt,draw=gray!50},
  title={\quad},
%  minor y tick num=4,
%   xtick=data,
  xtick ={0,1,...,3},
  minor xtick={0.2,0.4,...,3},
  ymajorgrids,
%  yminorgrids,
  xtick pos=left,
  ytick pos=left,
  scaled y ticks=true,
  ymin=0,
  xmin=0,
  xmax=3,
  ymax=25,
  ytick={0,5,...,25},
  legend style={legend pos= north west,legend cell align=left},
  mark size=2,
  xlabel={$\sigma_n$(degrees)},
  ylabel={Value (m)},
  tick scale binop=\times,
  height=5cm,
  semithick,
  mark repeat={2},
  scaled x ticks={base 10:0}
]
% red,gray,yellow,green,lime,black,red,blude,cyan
\addlegendentry{RMSE};
\addplot [color=orange,thick,mark=o] table [y=rmse, x=noise level] {\datatableentry};
\addlegendentry{mean error};
\addplot [color=cyan,thick,mark=diamond] table [y=mean error, x=noise level] {\datatableentry};
\end{axis}
\end{tikzpicture}
\end{document}

Se insertan en el papel así:

\begin{figure}[htb]
  \centering
  \subfloat[Performance  under different levels of increment noise]{\includegraphics[height=4cm]{incremental_noise/incremental_noise}}
\hspace{.5cm}
  \subfloat[Performance  under different levels of deviation noise]{\includegraphics[height=4cm]{deviation_noise/deviation_noise}}
  \caption{Resistence to different kind of noise.}
  \label{fig:noise_resistence}
\end{figure}

¿Tiene alguna idea sobre cómo resolver este problema? ¡Gracias!

Respuesta1

He sabido qué hacer para resolver el problema. Agrego \raisebox{-0.25ex}[0pt][0pt]mi archivo tex principal y el resultado se ve bien.ver esta respuestapara más detalles.

información relacionada