ne',5);
</pre>

<p>
To label each trace separately, provide <code>labels</code>.
</p>

<pre class="matlab">
L = {'first','second','third','fourth','fifth'};
stackplot(x,y,'none',5,L);
</pre>

<p>
Another example using a stacked plot to display orientation selection effects in ENDOR spectra recorded at different magnetic fields is shown below.
</p>

<pre class="matlab">
% ENDOR orientation selection in a powder
clear, clf

% Spin system
Sys.S = 1/2;
Sys.g = [2.3 2.1 2];
Sys.Nucs = '1H';
Sys.A = [3 6 2]; % MH