You are on page 1of 7

pgf-pie

Adjie Gumarang Pujakelana

23 Juli 2017

Awali dengan Pie


Kedelai

20%
Padi Jagung
10%
\begin{tikzpicture}
30%
\pie{10/Jagung, 20/Kedelai, 30/Padi, 40/Kacang tanah}
\end{tikzpicture}

40%

Kacang tanah

Posisi, Pemutaran, dan Ukuran


\begin{tikzpicture}
\pie{10/, 20/, 30/, 40/}%
\pie[pos={6,0},rotate=180,radius=2.5]{10/, 20/, 30/, 40/}%
\pie[pos={11,0},radius=2]{10/, 20/, 30/, 40/}%
\end{tikzpicture}

1
20%

40% 20%
10%
30% 30% 10%

10% 30%
40%
40%
20%

Pewarnaan
\begin{tikzpicture}
\pie[color={black!10, black!20,black!30,black!40}]
{10/A, 20/B, 30/C, 40/ D}
\pie[pos={8,0}, color=blue!20] {10/A, 20/B, 30/C, 40/ D}
\end{tikzpicture}

B B

20% 20%
C A C A
10% 10%
30% 30%

40% 40%

D D

Perenggangan
\begin{tikzpicture}
% perenggangan tertentu
\pie[explode={0, 0, 0, 0.1}]{10/A, 20/B, 30/C, 40/D}
% perenggangan semua
\pie[pos={8,0}, explode=0.1]{10/A, 20/B, 30/C, 40/D}
\end{tikzpicture}

2
B
B

20% 20%

C A C A
10% 10%
30% 30%

40% 40%

D D

Sudut Irisan (Slice)


\begin{tikzpicture}
\pie[sum=auto, after number=, radius=3]{33/Pria, 7/Wanita}
\pie[pos={9,0}, sum=40, after number=, radius=3]{33/Pria}
\end{tikzpicture}

Pria Pria

33 33

Wanita

Teks dan Angka


\begin{tikzpicture}
\pie[before number={Rp}, after number=rb,]{10/A, 20/B,
30/C, 40/D}
\pie[pos={9,0}, scale font]{10/A, 20/B, 30/C, 40/D}
\end{tikzpicture}

3
B B

Rp20rb 20%
C A C A
Rp10rb 10%
Rp30rb 30%

Rp40rb 40%

D D

Teks dan Penamaan


\begin{tikzpicture}
\pie[text=pin]{10/A, 20/B, 30/C, 40/ D}
\pie[pos={9,0}, text=inside]{10/A, 20/B, 30/C, 40/D}
\end{tikzpicture}

B
20%
20%
C A
A
10% C
30% 10%
30%

D
40%
40%

Teks dan Legenda


\begin{tikzpicture}
\pie[text=legend]{10/Satu, 20/Dua, 30/Tiga, 40/Empat}
\end{tikzpicture}

4
20%

Satu
10%
30% Dua
Tiga
Empat

40%

Bayangan (Shadow )
\begin{tikzpicture}
% dengan \usetikzlibrary{shadows}
\pie[style=drop shadow]{10/A, 20/B, 30/C, 40/D}
\end{tikzpicture}

20%
C A
10%
30%

40%

Diagram Berbentuk Kutub (Polar)


\begin{tikzpicture}
\pie[style=drop shadow]{10/A, 20/B, 30/C, 40/D}
\end{tikzpicture}

5
B
A
20%
10%

30% 40%

C
D

Diagram Berbentuk Persegi


\begin{tikzpicture}
\pie[square]{10/A, 20/B, 30/C, 40/D}
\end{tikzpicture}

A C

30% 40% D
10%

20% B

Diagram Berbentuk Awan


\begin{tikzpicture}
\pie[cloud, text=inside, scale font]{10/A, 20/B, 30/C, 40/D}
\end{tikzpicture}

6
B
20% D
40%
A
10%

C
30%

You might also like