I understand that eye diagrams give an indication of the quality of a signal. But I don't understand how they are displayed on an oscilloscope. With proper triggering shouldn't you get either positive or negative pulses, but not both?
First you have to set persistence on your scope. Normal persistence will show newer data over the previous, while older data fades at each scan. Infinite persistence also displays new data over the older, but the older doesn't fade, so that you can have literally thousands of images on top of each other.
There are two ways to create eye diagrams. One uses the external trigger where you connect the clock signal. Upon a clock pulse data can be high or low, so over time you'll see both pulses on top of each other.
If you don't have a separate clock signal the data itself is used to trigger the scope. If you look at a Manchester coded signal you'll see that pulses aren't always equally spaced. If you have
01 and trigger on the
0 the second bit will show low and then high, but when you have
00 the second bit will show a high followed by a low, the transition (which is actually the clock) will be at the same place.
So even when you trigger on a low to high signal some time later you may have different levels on different times.
It is not a single sweep, the display is built up over many sweeps (e.g. infinite persistence mode) so you can see the average noise and jitter (amongst other things) of the signal.
Usually it will be triggered using the clock rate of the signal (i.e. separate signal) so either a 1 or a 0 (or whatever the signals data types/levels are) will be captured and superimposed, and the waveforms will build up over time.
Here is a link describing setting up a scope for an eye pattern.