Diagram with axes $r$ and $S,I$ In the figure below, I have a coordinate system where $r$ depends on $I$ or $S$, but I do not completely understand why I can have multiple functions inside this coordinate system.

Why can I write $S(r)$ and $I(r)$? Normally, in an x-y-diagram, I interpret it as $y(x)$, since $x$ varies and $y$ depends on $x$.

The diagram below is a quite normal diagram in economics, so I know it is correct, but why isn't the figure 'transposed', i.e. with $r$ on the $x$-axis and $S,I$ on the $y$-axis?

It doesn't make sense that $r = S(r)$ or $r = I(r)$.
It was Alfred Marshall's doing, but based on a premise that still prevails in many parts of Economics: if prices are assumed totally elastic, then, although it may be the case that they are taken as given by the individual buyers or sellers, at market level it is quantity that determines price. So price is indeed the dependent variable, if you care about the market and not about the individual.  

And here is page 96 from Marshall's Principles of Economics (8th ed.1920), (the 1st edition was in 1890), the funny thing being that here Marshall talks about... individual demand! (but it would be totally confusing to swap axes between graphing individual demand and graphing market demand). Read the annotated footnote.