The following compiles well in TeXShop on one of my Mac computer (an old one), but produces error on another one. I must have forgot to install something on the new computer, but cannot figure out what. Any ideas?
\begin{tikzpicture}
\draw[very thin,color=gray] (1,1) ;
\foreach \x/\xtext in {0.3/a, 1.58/c, 2*pi/b}
\draw[shift={(\x,0)}] (0pt,2pt) -- (0pt,-2pt) node[below] {$\xtext$};
\draw[->] (-0.2,0) -- (9,0) node[right] {$x$};
\draw[->] (0,-0.2) -- (0,4.5) node[above] {$y$};
\draw plot[domain=0.3:2*pi]
(\x, 0.5+{0.5*(\x)+sin((\x) r)}) node[above right] {$f$};
\draw[-] [dotted]
(0.3,0.5+{0.5*(0.3)+sin((0.3) r)})--(2*pi, 0.5+{pi+sin(2*pi r)}) ;
\node at (pi/2, 0.5+{0.25*pi+1}){$\bullet$};
\draw[-] [draw=red]plot[domain=0.2:pi]
(\x, {0.5+{0.25*pi+1}+0.5*(\x-pi/2)}) node[above] {$f'(c)={f(b)-f(a)\over b-a}$};
\end{tikzpicture}
Error Message:
<to be read again>
{
l.23 ...0.3:2*pi] (\x, 0.5+{0.5*(\x)+sin((\x) r)})
node[above right] {$f$};

\listfilesbefore\begin{document}to get a list of all the packages and their versions. I had a problem like this caused by out of date packages on a separate OS. – Nathanael Farley Jan 12 at 17:32