# filldraw disappears

#### dwsmith

##### Well-known member
Since I have theta marked on the graph, fill draw doesn't show anymore. How can I have both?

Code:
\filldraw[left color=gray,right color=green, draw=green!50!black] -- (3mm,0mm) arc (0:30:4mm) -- cycle;
\draw[->] (-1.5,0) -- (1.5,0) coordinate (x axis);
\draw[->] (0,-1.5) -- (0,1.5) coordinate (y axis);
\draw (0,0) circle (1cm);
\foreach \x in {-1,1}
\draw (\x cm,1pt) -- (\x cm,-1pt) node[anchor = north] {$\x$};
\foreach \y in {-1,1}
\draw (1pt,\y cm) -- (-1pt,\y cm) node[anchor = east] {$\y$};
\draw -- node[right = .5 pt] {$\theta$}(0.9,0.35);
\draw[very thick, black] (0,0) -- (.70710678,.70710678);

#### Sudharaka

##### Well-known member
MHB Math Helper
Since I have theta marked on the graph, fill draw doesn't show anymore. How can I have both?

Code:
\filldraw[left color=gray,right color=green, draw=green!50!black] -- (3mm,0mm) arc (0:30:4mm) -- cycle;
\draw[->] (-1.5,0) -- (1.5,0) coordinate (x axis);
\draw[->] (0,-1.5) -- (0,1.5) coordinate (y axis);
\draw (0,0) circle (1cm);
\foreach \x in {-1,1}
\draw (\x cm,1pt) -- (\x cm,-1pt) node[anchor = north] {$\x$};
\foreach \y in {-1,1}
\draw (1pt,\y cm) -- (-1pt,\y cm) node[anchor = east] {$\y$};
\draw -- node[right = .5 pt] {$\theta$}(0.9,0.35);
\draw[very thick, black] (0,0) -- (.70710678,.70710678);
Hi dwsmith,

I checked your code, and to me the command \filldraw seem to work, although I am not sure as to what you expect out of it. What part of the circle do you want to color?

Kind Regards,
Sudharaka.

#### dwsmith

##### Well-known member
Hi dwsmith,

I checked your code, and to me the command \filldraw seem to work, although I am not sure as to what you expect out of it. What part of the circle do you want to color?

Kind Regards,
Sudharaka.
View attachment 352

See page 6 and you will see that fill draw didn't work.

#### Sudharaka

##### Well-known member
MHB Math Helper
View attachment 352

See page 6 and you will see that fill draw didn't work.
I understand the problem now. For some reason I saw the desired output in the preview but not in the pdf file. I have changed the code(highlighted in red) and hope it works now. Is this the intended output?
Code:
\begin{tikzpicture}

\filldraw[left color=gray,right color=green, draw=green!50!black] [COLOR=#ff0000](0,0) [/COLOR]-- (3mm,0mm) arc (0:30:4mm) -- cycle;

\draw[->] (-1.5,0) -- (1.5,0) coordinate (x axis);

\draw[->] (0,-1.5) -- (0,1.5) coordinate (y axis);
\draw (0,0) circle (1cm);
\foreach \x in {-1,1}
\draw (\x cm,1pt) -- (\x cm,-1pt) node[anchor = north] {$\x$};
\foreach \y in {-1,1}
\draw (1pt,\y cm) -- (-1pt,\y cm) node[anchor = east] {$\y$};
\draw -- node[right = .5 pt] {$\theta$}(0.9,0.35);
\draw[very thick, black] (0,0) -- (.70710678,.70710678);

\end{tikzpicture}