答案1
也许您可以根据所需的方程式来改变它?
\documentclass{article}
\usepackage{pgfplots}
\usepackage[graphics,tightpage,active]{preview}
\PreviewEnvironment{tikzpicture}
\pgfplotsset{compat=1.9}
\usetikzlibrary{backgrounds}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
ymin=-4,%
ymax=4,%
grid=both,%
%axis on top
]
\begin{scope}[on background layer]
\fill[blue,opacity=0.5] ({rel axis cs:0,0}) rectangle ({rel axis cs:1,1});
\end{scope}
\addplot[domain=-360:360, white , very thick, smooth]{sin(x)}; %add equation here
\addplot[domain=-360:360, green , very thick, smooth]{2*cos(x)};% and here
\end{axis}
\end{tikzpicture}
\end{document}