# TikZpicture: Tangential Linear IRR function graph

Apr 13th, 2021
571
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
1. \begin{figure}[!h]
2. \caption{Tangential Income Replacement Rate formula\label{tangent}}
3. \hspace*{-0.1\baselineskip}\begin{tikzpicture}
4. \begin{axis}[%title=Income Replacement Rate Formulae,
5. width=0.97\textwidth, height=0.62\textwidth, axis lines=left, xmin=0, xmax=50000, scaled x ticks=base 10: -3, xtick scale label code/.code={}, /pgf/number format/.cd, 1000 sep={},
6. ymin=0, ymax=0.9, ytick distance=0.1, grid=major,
7. ylabel= Income Replacement Rate (IRR), xlabel= $Y_i\cdot 10^{-3}$: Income per month (thousands of rands),
8. %y label style={at={(axis description cs:-0.05, 0.85)},rotate=0,anchor=south}
9. ]
10. \addplot [domain=0:17712, color=dred, thick] {0.292 + 0.616/(2+x/3542.4)};
11. \addplot [domain=0:17712, color=dpurple, thick] {0.38*2 - 0.38/17712*x};
12. \addplot [domain=17712:36000, color=dpurple!30, thick] {0.38*2 - 0.38/17712*x};
13. \node [anchor=west, color=dpurple] at (2400, 0.74) {$k(Y_i) = 0.38\times 2 - \mathlarger{\frac{0.38}{17712}}\cdot Y_i$};
14. \addplot [domain=7000:17712, color=dorange!30, thick, samples=30] {0.38*17712/x};
15. \addplot [domain=17712:60000, color=dorange, thick, samples=30] {0.38*17712/x};
16. \addplot [domain=0:17712, color=dgreen, thick] { 0.6 - 0.22/17712*x};
17. \addplot [domain=0:60000, color=dblue, thick] {0.38};
18. \node [anchor=west, color=dblue] at (41000, 0.34) {$g(Y_i) = 0.38$};
19. \node [anchor=west, color=dred] at (900, 0.45) {$h(Y_i)$};
20. \node [anchor=west, color=dgreen] at (2000, 0.595) {$f(Y_i)$};
21. \node [anchor=east, color=dorange] at (46200, 0.228) {$q(Y_i) = \frac {0.38\times 17712}{Y_i}$};
22. \addplot [mark=*] coordinates {(17712, 0.38)};
23. \node [anchor=south west] at (17712, 0.38) {$(17712, 0.38)$};
24. %\node [anchor=north east] at (7.5, 2.5) {$E_3$};
25. \end{axis}
26. \end{tikzpicture}
27. \end{figure}
RAW Paste Data