How do I limit the y values on the following tikz picture, so that the functions are contained in the box? I tried 'clipping' it into a rectangle, but this makes it hard to format it, and to write captions around the figure. Any tips?
\begin{figure}[h]
\centering
\begin{minipage}{0.48\textwidth}
\begin{tikzpicture}[scale=1.3]
\foreach \a/\Col in {0.25/green,3/red, 1/black}
{
\draw[\Col] plot[domain=0:4, range=0:4,variable=\x,samples=90] ({\x},{0.625*(\x^(\a+1))/(0.5*(\x^\a+1))});
}
\foreach \a/\Col\dashing in {3/cyan/dashed,0.25/magenta/dashed, 1/black}
{
\draw[\Col, \dashing] plot[domain=0:4, range=0:4, variable=\x,samples=90] ({\x},{\a*(\x^2)/(0.5*(1+\a*\x)});
}
\draw (0,0) rectangle (4,4);
\draw [dotted] (1,0) node[below]{$1$} -- (1,4);
\draw [dotted] (0,1.1) node[left]{$0.5$} -- (4,1.1);
\node at (3.6,-.2) {$v_i$};
\node at (-.2,3.85) {\small MRS};
\node [text=red, rotate=26] at (2.3,3.25) {\small $\alpha=4$};
\node [text=green, rotate=28] at (2.9,2.1) {\small $\alpha=1/4$};
\node [text=cyan, rotate=13] at (1.55,1.42) {\small $a_i=4$};
\node [text=magenta, rotate=10] at (0.85,0.2) {\small $a_i=4$};
\end{tikzpicture}
\end{minipage}
\end{figure}





\documentclasscommand, include any necessary packages and be as small as possible to demonstrate your problem. At the moment we have to guess what packages etc you are using before we can compile your code. – Jul 28 '18 at 23:23