The data in the chart display needs to be transposed in order for it to display as you are expecting. Right click on the waveform chart and turn off transpose. When you run your code now you should get what you expect, both in stacked and overlay mode.
I often get caught out by this. The fanning out of the coloured lines usualy indicate the problem.
