# How do I add other plots to a stacked plot?

If I have a ybar stacked axis type, how can I add another plot such as a jump plot on top?

The example below shows more or less what I need:

You can switch off the stacking for a single plot by using stack plots=false:

\documentclass{standalone}

\usepackage{pgfplots}

\begin{document}

\pgfplotsset{
colormap={whitered}{color(0cm)=(white); color(1cm)=(orange!75!red)}
}

\begin{tikzpicture}
\begin{axis}[
samples=10,
ybar stacked,
ymin=0,
set layers
]

• @user1831847: Pleasure! However, tex.stackexchange.com/questions/115152/… is still open, because this approach only works if the const plot has the same number of coordinates as the stacked plots (which is really a bug, I believe, because once we set stack plots=false, the number of coordinates shouldn't matter). – Jake May 21 '13 at 15:44
• I agree with you that it should reset the number of coordinates as well. Maybe stack plots=reset? – skvery May 21 '13 at 18:51