Here's an option using pgfplots, which can be compiled with pdflatex

\documentclass{article}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}[>=stealth]
\begin{axis}[
xmin=-4,xmax=4,
ymin=-2,ymax=2,
axis x line=middle,
axis y line=middle,
axis line style=<->,
xlabel={$x$},
ylabel={$y$},
]
\addplot[no marks,blue,<->] expression[domain=-pi:pi,samples=100]{sin(deg(2*x))+1/2}
node[pos=0.65,anchor=south west]{$y=\sin(2x)+\frac{1}{2}$};
\end{axis}
\end{tikzpicture}
\end{document}
One of the main reasons I like this package, is that global styles can be specified easily in the preamble. So, if you're going to have more than one of these plots, it might be a good idea to use something like the following setup
\documentclass{article}
\usepackage{pgfplots}
% axis style
\pgfplotsset{every axis/.append style={
axis x line=middle, % put the x axis in the middle
axis y line=middle, % put the y axis in the middle
axis line style={<->}, % arrows on the axis
xlabel={$x$}, % default put x on x-axis
ylabel={$y$}, % default put y on y-axis
}}
% line style
\pgfplotsset{mystyle/.style={color=blue,no marks,line width=1pt,<->}}
% arrow style: stealth stands for 'stealth fighter'
\tikzset{>=stealth}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
xmin=-4,xmax=4,
ymin=-2,ymax=2,
]
\addplot[mystyle] expression[domain=-pi:pi,samples=100]{sin(deg(2*x))+1/2}
node[pos=0.65,anchor=south west]{$y=\sin(2x)+\frac{1}{2}$};
\end{axis}
\end{tikzpicture}
\end{document}