How can split circle (tikz shape circle) in two parts. However, I would like the split to be uneven i.e. the top part occupy lets say 30% of the area and lower part the rest 70%.



If you want to fill a circle segment so the circle segment takes up a specified area of the circle, you'll need to iteratively solve the area equation for the central angle of the segment.

Here's a way to do this using Newton's method:


\tikzset{ % Declare the function and its derivative
    declare function={f(\a) = 1/(2*pi)*(2*\a - sin(2*deg(\a)));},
    declare function={fprime(\a) = 1/(2*pi)*(2 - cos(2*deg(\a)));}

\newcommand\newton[4]{ % arguments: function, derivative, start value, precision
\ifdim \residual pt > #4 pt%


\fill [cyan!50]
    arc [
        start angle=-\angle-90,
        end angle=-90+\angle,
    -- (-\angle-90:\radius);
\draw (0,0) circle [radius=\radius] node {\pgfmathprintnumber{\fraction}};
  • Wouldn't a path picture with two rectangles be faster for this? – percusse Oct 14 '13 at 8:16
  • @percusse: How would you specify what fraction of the circle is filled? – Jake Oct 14 '13 at 8:36
  • I used the taylor expansion on x-sin(x) to solve a polynomial. But on a second thought I think that would also be a rough approx. – percusse Oct 14 '13 at 9:06
  • Jake, this is simply brilliant. Thanks so much. I wanted to fill the lower part with text. Usually, with regular circle split I would have used keyword lowerpart followed by text. I am quite happy with the current solution. – Sandeep Oct 14 '13 at 14:27

Without even a mock-up of what you want it is difficult to understand what it is that you need, or where you are having trouble doing this, but one possibility would be to use polar coordinates, as explained in section 13.2.1 ("Canvas, XYZ and Polar Coordinate Systems") of the manual.

You can then specify coordinates with an angle and the distance instead of x and y magnitudes. This is one possibility:


  \draw (0,0) circle [radius=1];
  \draw (36:1) -- (0,0) -- (144:1);

enter image description here

If this is not what you want, you'll have to be more specific.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.