# Tikz Polar Fill to Origin

I'm trying to shade under a polar graph. I'm using this code:

\documentclass{exam}
\usepackage{graphicx}
\usepackage{tikz}
\begin{document}
\begin{center}
\begin{tikzpicture}
\fill[fill=gray] plot[domain=pi/8:pi/4] (xy polar cs:angle=\x r,radius= {3*cos(pi/8 r)});
\end{tikzpicture}
\end{center}
\end{document}


The result doesn't fill all the way to the origin as it should. I'm getting this:

How do I make it shade all the way to the origin?

• Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. – Adam Liter Apr 21 '15 at 1:31
• I completed the code. – adam Apr 21 '15 at 1:42
• Your code doesn't produce the picture in your question! The idea of MWE is to help people help you. Asking us to recreate your picture (almost) from scratch seems a little pointless... – Andrew Apr 21 '15 at 5:08

\documentclass{exam}