# Trig function not plotting correctly in tikz

I have the following snippet

\begin{tikzpicture}
\draw[black, domain=0:10] plot({\x}, {cos(((9 - \x)/8)*3.141592)});
\end{tikzpicture}


When I compile the file, however, the plot just produces a straight line. I think this means that it's not sampling points correctly, but I'm not sure how to fix this.

Any insight would be appreciated.

The units of \x are the problem, if you tell tikz that you are trying to deal in radians then it will cooperate! Let tikz know to treat that number as a quantity in radians by including the letter 'r' before closing the parenthesis after cos:
\begin{tikzpicture}