LaTeX Fill with color three of five sectors in circle with latex.

  • Thread starter 76Ahmad
  • Start date
Hi every one,
here is a question about drawing and filling in Latex (\usepackage{tikz})

I just draw a circle with 5 sectors correctly,
and what I need help on please, how I fill 3 sectors with green color
and the other 2 sectors with red...

please help me with this task.

\begin{tikzpicture}[scale=1.2]
\tkzDefPoint(0,0){O}
\tkzDrawCircle[R](O,1 cm)
\def\sectors{5}
\foreach \i in {1,2,...,\sectors} {
\tkzDefPoint({\i*360/\sectors}:1){P\i}
\tkzDrawSegment(O,P\i)
}
\end{tikzpicture}
 

Want to reply to this thread?

"Fill with color three of five sectors in circle with latex." You must log in or register to reply here.

Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving
Top