New Reply

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

 
Share Thread Thread Tools
Dec10-12, 06:48 PM   #1
 

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


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[color=black](O,P\i)
}
\end{tikzpicture}
PhysOrg.com
PhysOrg
science news on PhysOrg.com

>> King Richard III found in 'untidy lozenge-shaped grave'
>> Google Drive sports new view and scan enhancements
>> Researcher admits mistakes in stem cell study
New Reply
Thread Tools


Similar Threads for: Fill with color three of five sectors in circle with latex.
Thread Forum Replies
Mathematica PlotStyle->{color,color,color} not working Math & Science Software 3
Writting a Circle in a Latex Document Math & Science Software 0
Latex underbrace - change color Math & Science Software 1
sectors in disk Engineering, Comp Sci, & Technology Homework 9
Hidden sectors High Energy, Nuclear, Particle Physics 2