Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

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

  1. Dec 10, 2012 #1
    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}
     
  2. jcsd
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted
Similar Discussions: Fill with color three of five sectors in circle with latex.
Loading...