I want to draw a limited sine curve.
My problem is, that I know how to draw 1/4 sin but not how to get only a section of it.
\setlength{\unitlength}{1mm}
\begin{minipage}{\linewidth}
\begin {nofloat}{figure}
\begin{center}
\begin{tikzpicture}[ cross/.style={draw, cross out,
minimum size=2*(#1-1pt), inner sep=0pt, outer sep=0pt}, x=1cm, y=1cm]
\colorlet{grey}{black!50}
\draw[-,thick,dashed] (-4,2) node[left] {$UpperLimit$} -- (2,2);
\draw[->,thick] (-4,1) -- (2,1)node[right] {$t$};
\draw[-,thick,dashed] (-4,0) node[left] {$LowerLimit$} -- (2,0);
\draw[->,thick] (-3,-0.5) -- (-3,2.5)node[above] {$\textcolor{grey}{u} |\textcolor{red}{ \ind{u}{Clipped}}$};
\draw[thick, dashed, grey] (-3,1) sin (-2,2.5);
\draw[thick, dashed, grey] (-2,2.5) cos (-1,1);
\draw[thick, dashed, grey] (-1,1) sin (0,-0.5);
\draw[thick, dashed, grey] (0,-0.5) cos (1,1);
\draw[ultra thick, red] (-3,1) sin (-2,2.5);
\draw[ultra thick, red] (-2.53545,2) -- (-1.46455,2);
\draw[ultra thick, red] (-2,2.5) cos (-1,1);
\draw[ultra thick, red] (-1,1) sin (0,-0.5);
\draw[ultra thick, red] (-0.53545,0) -- (0.53545,0);
\draw[ultra thick, red] (0,-0.5) cos (1,1);
% \draw [red,thick,domain=0:-2.53545] plot ( {1.5*sin(\x*2*pi/4)+1});
\end{tikzpicture}
\end{center}
\caption{Effect of the Accuracy Shutdown}
\label{fig:accshut}
\end{nofloat}
\end{minipage}
I would like something like at the minimum but what I only can produce is something like the maximum.



\documentclassto\end{document}with all significant packages and own commands. – Ignasi Nov 07 '17 at 11:12