TITLE: On the horizontal integration of the Lebesgue integral
QUESTION [11 upvotes]: I'm studying Lebesgue integral and its difference with respect to the Riemann one.
I'm reading that the key difference (at least graphically speaking) is that the first slices the function horizontally, while the latter works vertically. This concept is summed in the figure.  

In Riemann integral definition the graphical procedure is trivial, as we have
$$\int f(x) dx= \lim_{x\to+\infty}\sum_{i=1}^n f(x_i) (x_i-x_{i-1})$$
and so the $(x_i-x_{i-1})$ is the basis of my rectangle while $f(x_i)$ is the height.
In Lebesgue we have (following Rudin pg.19)
$$\int_E f d\mu = \sup\int_E s d\mu = \sup \sum_{i=1}^n \alpha_i \mu(A_i \bigcap E_i)$$
but I can't get in any formulation of the Lebesgue integral which is the basis of the rectangle and which is the height, also because in Lebesgue there is no $x$ in the integral.
I think that $d\mu$ in this case become the small height of each rectangle but I don't figure out how $f$, which was the height in Riemann, now could become the basis. Vice versa, if $d\mu$ is still the basis and I integrate according to the variation of $\mu$, this technique does not seem to cut horizontally the function.
What is the idea behind this horizontal integration?
I read Lebesgue integral basics a possible answer but still I can't figured out a completely clear explanation.
Any suggestion is really appreciated.

REPLY [4 votes]: The fact that the Lebesgue integral "works vertically" means that we start by partitioning the range of the function (instead of the domain) and drawing horizontal lines from these points. But the final rectangles are not horizontal in the sense of your red figure.
Therefore, you didn't understand it because there is no natural connection between the usual definition and your red figure. Actually, as the $E_i$ are not apparent, the important fact that they aren't intervals, aren't lengths or heights and, eventually, are very complicated (which motivates the definition of measurable sets and measurable functions) is completely lost in the  figure. By the way, the fact that this figure is so wrong that it should be removed from the Wikipedia's article is discussed here.
I suggest you take a look at the appropriate geometric interpretation as, for example, in Preface of Mikusinski's book or in Chapter 2 of Folland's book. As explained in these texts, the correct picture would have the following form (source):

Of course, this picture can also illustrate an approximation for the Riemann integral. This happens because the Lebesgue integrable functions that have "nice figures" are also Riemann integrable. So, what really matters is not the final form of the figure (as suggested by the original red figure), but the way it is constructed (which is explained in the cited books).