在多個 y 軸圖上重新調整 xticks

在多個 y 軸圖上重新調整 xticks

我對使用 PGFplot 繪圖有很多疑問,

  1. 如何重新縮放xticks多個 y 圖?

  2. 如何將 .10(-2) 向右移動一點,使其看起來對齊?

  3. 如何改變xtickslabel

    當我使用時,xtickslabel={1992,1993,1994,1995,1996}我會得到每一個刻度,以及第二張圖片中顯示的 5 年。

在此輸入影像描述

在此輸入影像描述

\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},
        scaled ticks=false,
        y tick label style={anchor=east},   
                 ytick pos=left,
        scaled ticks=true,
        xmin=0,
        xmax=120,       
        xticklabel=\empty,
        ]
                \addlegendimage{empty legend}
                \addplot[red, mark=+]  table{Annexes/resultats/BET/GRAPbjh1.dat};
        \addlegendentry{Graphite}            
              \begin{groupplot}[group style={group size= 2 by 3,horizontal sep = 1.5cm,vertical sep =1.5cm},height=6.5cm,width=8cm
]
\nextgroupplot[xlabel={Pression Relative p/p$°$}, legend pos=north east,
        legend style={draw=none},
        scaled ticks=false, %enlever le.10^-5 !!!!!!!!!!!!
        y tick label style={anchor=west},       
        xmin=0,
        xmax=110,  % I JUST FOUND THIS WHEN POSTING THE CODE SO THE SCALE IS OK 
        yticklabel pos=right,
        ytick pos=right,    
        scaled ticks=true,  
        ]
                \addlegendimage{empty legend}
                 \addplot[green, mark=o]   table{Annexes/resultats/BET/GRAPbjh2.dat};
        \addlegendentry{Graphite}

對於我找到「解決方案」的比例,10^-2 讓我感到困惑。

第三個問題的程式碼是xtickslabel

\begin{tikzpicture}
\begin{axis}[
xticklabel={1992;1993;1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012},
xlabel={2008},
stack plots=y,
ylabel= {Total credit},
scaled ticks=true,
]
\addplot [black] table{Annexes/resultats/herbicides.dat};
%\addplot table[x=date,y=account2] {plotdata/accounts.dat};
%\addplot table[x=date,y=account3] {plotdata/accounts.dat};
\end{axis}
\end{tikzpicture}

相關內容