22

I have found how to draw an arc with a specific node as center. So I drew circles made of 1 to 4 sectors.
However, I get additional margin (right and bottom) when I draw with 3 sectors, even if codes are similar.

Where does this artifact comes from?

MWE

\documentclass{scrartcl}
    \usepackage{tikz}
\begin{document}
    \fbox{\begin{tikzpicture}%
        \fill [green] (0,0) ++ (0:1) arc (0:90:1) -- (0,0) -- cycle;
        \fill [yellow] (0,0) ++ (-90:1) arc (-90:0:1) -- (0,0) -- cycle;
        \fill [red] (0,0) ++ (-180:1) arc (-180:-90:1) -- (0,0) -- cycle; 
        \fill [blue] (0,0) ++ (90:1) arc (90:180:1) -- (0,0) -- cycle;
    \end{tikzpicture}}
    \fbox{\begin{tikzpicture}%
        \fill [orange] (0,0) ++ (-30:1) arc (-30:90:1) -- (0,0) -- cycle;
        \fill [pink] (0,0) ++ (-150:1) arc (-150:-30:1) -- (0,0) -- cycle;
        \fill [gray] (0,0) ++ (90:1) arc (90:210:1) -- (0,0) -- cycle;
    \end{tikzpicture}}
    \fbox{\begin{tikzpicture}%
        \fill [purple] (0,0) ++ (-90:1) arc (-90:90:1) -- (0,0) -- cycle;
        \fill [green] (0,0) ++ (90:1) arc (90:270:1) -- (0,0) -- cycle;
    \end{tikzpicture}}
    \fbox{\begin{tikzpicture}%
        \fill [brown] (0,0) circle (1);
    \end{tikzpicture}}
\end{document}
ebosi
  • 11,692
  • 4
    Looks like a bug to me: as a workaround fill the pink sector in two parts: \fill [pink] (0,0) -- (210:1) arc (210:270:1) -- cycle; \fill [pink] (0,0) -- (270:1) arc (270:330:1) -- cycle; – Thruston May 03 '16 at 17:36
  • 2
    Off topic: slightly shorter arc syntax: \fill [orange] (0,0) -- (-30:1) arc (-30: 90:1) -- cycle; – Thruston May 03 '16 at 17:38
  • It happens even for other pictures if the angles are changed.
  • It happens in the top and and left margins when the angles are changed.
  • – AJN May 03 '16 at 17:56
  • @Thruston Indeed, it solves the issue for the bottom margin ("Breaking" the orange sector into two parts (at angle 0) similarly solves the right margin issue). – ebosi May 03 '16 at 18:00