pgfplots:为每个groupplot分别修改堆叠图中y轴的比例

pgfplots:为每个groupplot分别修改堆叠图中y轴的比例,plot,latex,tikz,Plot,Latex,Tikz,我需要用不同的参数设置绘制不同模拟的结果。它们在x轴上共享相同的类别(A到Q)。所以,我从主题中的一些有用代码开始堆叠它们。不幸的是,所有y轴的比例相同。试图在每个\nextgroupplot节中插入不同的比例以优化可用空间的使用失败。有没有人知道如何从一般缩放改为单独缩放?当前代码如下所示: % Preview source code %% LyX 2.0.1 created this file. For more info, see http://www.lyx.org/. %% Do

我需要用不同的参数设置绘制不同模拟的结果。它们在x轴上共享相同的类别(A到Q)。所以,我从主题中的一些有用代码开始堆叠它们。不幸的是,所有y轴的比例相同。试图在每个\nextgroupplot节中插入不同的比例以优化可用空间的使用失败。有没有人知道如何从一般缩放改为单独缩放?当前代码如下所示:

% Preview source code

%% LyX 2.0.1 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}

\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.

\usepackage {tikz}
\usepackage{pgfplots}
\usetikzlibrary{pgfplots.groupplots}
\usetikzlibrary{shapes}
\usetikzlibrary{plotmarks}

\makeatother

\usepackage{babel}
\begin{document}
\begin{tikzpicture}
\begin{groupplot}[group style={group name=my plots,group size=1 by 3,xlabels at=edge bottom,xticklabels at=edge bottom,ylabels at=edge left,yticklabels at=edge left,vertical sep=0pt},footnotesize,width=16cm,xlabel=,height=5cm,xmin=-0.5,xmax=16.5,ymin=0,ymax=8,ytick={0,1,2,3,4,5,6,7},xtick={0,1,...,16},xticklabels={A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q},tickpos=left,ytick align=outside,xtick align=outside]
\nextgroupplot
\addplot coordinates{(0,1.00)(1,1.00)(2,1.00)(3,1.00)(4,1.00)(5,1.00)(6,1.00)(7,1.00)(8,1.00)(9,1.00)(10,1.00)(11,1.00)(12,1.00)(13,1.00)(14,1.00)(15,1.00)(16,1.00)};
\addplot coordinates{(0,1.00)(1,0.88)(2,1.83)(3,1.05)(4,1.02)(5,0.99)(6,0.98)(7,0.95)(8,1.00)(9,1.15)(10,1.19)(11,2.34)(12,1.06)(13,1.00)(14,1.00)(15,1.00)(16,1.00)};
\addplot coordinates{(0,1.00)(1,0.60)(2,5.02)(3,1.26)(4,1.12)(5,0.94)(6,0.92)(7,0.75)(8,1.00)(9,1.75)(10,1.92)(11,7.50)(12,1.29)(13,1.00)(14,1.00)(15,1.00)(16,1.00)};
\nextgroupplot
\addplot coordinates{(0,1.00)(1,1.00)(2,1.00)(3,1.00)(4,1.00)(5,1.00)(6,1.00)(7,1.00)(8,1.00)(9,1.00)(10,1.00)(11,1.00)(12,1.00)(13,1.00)(14,1.00)(15,1.00)(16,1.00)};
\addplot coordinates{(0,1.01)(1,0.99)(2,1.09)(3,1.00)(4,1.00)(5,1.00)(6,1.00)(7,1.00)(8,1.00)(9,1.00)(10,1.00)(11,1.00)(12,1.00)(13,1.01)(14,1.01)(15,1.76)(16,1.03)};
\nextgroupplot
\addplot coordinates{(0,1.00)(1,1.00)(2,1.00)(3,1.00)(4,1.00)(5,1.00)(6,1.00)(7,1.00)(8,1.00)(9,1.00)(10,1.00)(11,1.00)(12,1.00)(13,1.00)(14,1.00)(15,1.00)(16,1.00)};
\addplot coordinates{(0,0.98)(1,0.99)(2,1.06)(3,0.99)(4,1.00)(5,0.98)(6,0.98)(7,0.93)(8,1.00)(9,0.98)(10,0.98)(11,1.08)(12,1.00)(13,0.99)(14,0.98)(15,1.74)(16,1.02)};
\end{groupplot}
\end{tikzpicture}
\end{document}
结果看起来像。为了使源代码更具可读性,删除了一些行,图中显示了更多行。在中、下段可以看出,图中没有使用所有可用的空间,但应该这样做。
我希望我做的事情是正确的,因为这是我关于堆栈溢出的第一篇文章。非常感谢你的帮助。Thilo

你说它失败是什么意思
\nextgroupplot[ymax=3]…
适用于我使用
pdflatex
。您也可以用这种方式更改
ytick
。它失败是什么意思
\nextgroupplot[ymax=3]…
适用于我使用
pdflatex
。您也可以用这种方式更改
ytick