移动“.10^-2”

移动“.10^-2”

在此处输入图片描述将其向右移动,使其与另一条对齐yticklabels约 0.2 厘米或更多

谢谢

\begin{tikzpicture}
\begin{groupplot}[group style={group size= 2 by 3,horizontal sep  =1.5cm,vertical sep =1.5cm},height=6.5cm,width=8cm]
           \nextgroupplot[legend pos=north east,
        legend style={draw=none},
        y tick label style={anchor=east},       
        xticklabel=\empty,
        ytick pos=left,
        scaled ticks=true,      
        xmin=0,
        xmax=120,       
        ]
                \addlegendimage{empty legend};
                \addplot[red, mark=+] table{Annexes/resultats/BET/GRAPbjh1.dat};
                \addlegendentry{Graphite}[15 pt];               
                \coordinate (top) at (rel axis cs:0,1);
\end{groupplot}
    \begin{groupplot}[group style={group size= 2 by 3,horizontal sep =1.5cm,vertical sep =1.5cm},height=6.5cm,width=8cm]

\nextgroupplot[legend pos=north east,
        legend style={draw=none},
        y tick label style={anchor=east},       
             xticklabel=\empty,
        ytick pos=left,
        scaled ticks=true,      
        xmin=0,
        xmax=120,       
        ]
                \addlegendimage{empty legend};
                \addplot[red, mark=+] table{Annexes/resultats/BET/GRAPbjh2.dat};\label{plotsplot1}
                \addlegendentry{Graphite}[15 pt];               
               \coordinate (top) at (rel axis cs:0,1);
\end{groupplot}
\end{tikzpicture}

答案1

这可以通过

    scaled ticks=true,
    every y tick scale label/.append style={anchor=south west,xshift=0.2cm},

xshift根据需要更改值。

\documentclass[border=4]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.12}
\usepgfplotslibrary{groupplots}

\begin{document}
  \begin{tikzpicture}
    \begin{groupplot}[group style={group size= 2 by 3,horizontal sep =1.5cm,vertical sep =1.5cm},height=6.5cm,width=8cm]
       \nextgroupplot[legend pos=north east,
        legend style={draw=none},
        y tick label style={anchor=east},
        xticklabel=\empty,
        ytick pos=left,
        scaled ticks=true,
        every y tick scale label/.append style={xshift=-0.4cm},
        xmin=0,
        xmax=120,
        ]
\addlegendimage{empty legend};
                \addplot[red,domain=0:100, mark=+] {0.05*rnd};\label{plotsplot1}
               \addlegendentry{Graphite}[15 pt];
               \coordinate (top) at (rel axis cs:0,1);% coordinate at top of the first plot
\end{groupplot}
\begin{groupplot}[group style={group size= 2 by 3,horizontal sep = 1.5cm,vertical sep =1.5cm},height=6.5cm,width=8cm
]
       \nextgroupplot[legend pos=north east,
        legend style={draw=none},
        y tick label style={anchor=west},
        yticklabel pos=right,
        ytick pos=right,
        scaled ticks=true,
        every y tick scale label/.append style={anchor=south west,xshift=0.2cm},    %%<--- this
        xmin=0,
        xmax=120,
        ]
                \addlegendimage{empty legend};
                \addplot[green,,domain=0:100, mark=o] {0.05*rnd};
        \addlegendentry{Graphite}[15 pt];
                \coordinate (top) at (rel axis cs:0,1);% coordinate at top of the first plot
\end{groupplot}
\end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容