Professional Documents
Culture Documents
Mục lục
1 Giới thiệu 1
1 Giới thiệu
Yuan Xu viết gói lệnh để vẽ bóng của các hình vẽ bằng TikZ/PGF có tại
https://ctan.org/tex-archive/graphics/pgf/contrib/pgf-pie
Muốn sử dụng nhất thiết phải cài xong tikz.sty.
1
http://nhdien.wordpress.com 2
7 8: 2
\begin{tikzpicture} B
\pie{10/A, 20/B, 30/C, 40/D}
\end{tikzpicture}
20%
C A
10%
30%
40%
20%
20%
40% 10%
30% 10% 30%
10% 30%
40%
20% 40%
2.3 Tô mầu
Mầu đặt bằng tùy chọn color, mặc định quay tròn theo bánh xe. Như
7 8
\begin{tikzpicture}
http://nhdien.wordpress.com 3
\pie{10/, 10/, 10/, 10/, 10/, 10/, 10/, 10/, 10/, 10/}
\end{tikzpicture}
: 2
10%
10% 10%
10% 10%
10% 10%
10% 10%
10%
Đặt mầu
7 8
\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}
: 2
B B
20% 20%
C A C A
10% 10%
30% 30%
40% 40%
D D
7 8
\begin{tikzpicture}
% explode list
\pie[explode={0, 0, 0, 0.1}] {10/A, 20/B, 30/C, 40/D}
% explode all
http://nhdien.wordpress.com 4
20% 20%
C A C A
10% 10%
30% 30%
40% 40%
D D
33 33
7
Girls
Hai đối số có thể dùng thiết kế chữ số: before number và after number. Hai thông số bỏ trống là mặc định, nhưng
nếu sum=100, after number sẽ đặt là % tự động.
http://nhdien.wordpress.com 5
7 8: 2
\begin{tikzpicture} B
\pie[radius=2]{10/A, 20/B, 30/C, 40/D}
\end{tikzpicture}
20%
C A
30% 10%
40%
Độ phóng phông Cỡ của phông trong biểu đồ phong theo độ rộng của nó tương xứng miếng to hoặc nhỏ.
7 8: 2
\begin{tikzpicture} B
\pie[scale font]{10/A, 20/B, 30/C, 40/D}
\end{tikzpicture}
20%
C A
10%
30%
40%
Giá trị của thông số text là label(mặc định), pin, inside hoặc legend.
7 8: 2
\begin{tikzpicture} B
\pie[text=pin, radius=2]{10/A,
20/B, 30/C, 40/D}
\end{tikzpicture}
20%
C A
30% 10%
40%
D
http://nhdien.wordpress.com 6
7 8: 2
\begin{tikzpicture}
\pie[text=inside, radius=2]{10/A,
B
20/B, 30/C, 40/D}
20%
\end{tikzpicture} A
C
30% 10%
D
40%
7 8: 2
\begin{tikzpicture}
\pie[text=legend,radius=2]{10/First,
20/Second, 30/Third , 40/Fourth} 20%
\end{tikzpicture} First
30% 10% Second
Third
Fourth
40%
40%
D
http://nhdien.wordpress.com 7
30% 40%
C
D
3.2 Square
7 8: 2
\begin{tikzpicture} A C
\pie[square]{10/A, 20/B, 30/C, 40/D}
\end{tikzpicture}
30% 40% D
10%
20% B
C
30%
Hong Kong
Bulgaria
Switzerland
South Sudan 7
Burundi 7 7
Benin 8 8
Somalia 8 8 Serbia
Sweden 8 8 Israel
Guinea 9 8 Honduras
Haiti 9 9 United Arab
Bolivia 9 9 Austria
Tunisia 1010 Azerbaijan
Greece 1010 Dominican Repub
Chad 1010 Belarus
Senegal 1010 Hungary
1010 Rwanda
Zambia Czech Republic
Ecuador 1110 Portugal
Mali 12 11 Belgium
Niger 13 12 Cuba
14 13 Zimbabwe
Kazakhstan 14 14
Chile Cambodia
15 14 Guatemala
Cameroon 16 15 Malawi
Mozambique 17 16 Burkina Faso
Madagascar 19 19 Netherlands
Yemen 20 19 Angola
Taiwan 20 20 Cote d’Ivoire
North Korea 22 21 Sri Lanka
Saudi Arabia 23 22 Romania
Malaysia 24 23 Australia
Venezuela 27 24 Syria
28 27 Ghana
Sudan Uzbekistan
Iraq 29 28 Nepal
Morocco 30 29 Peru
Algeria 31 31 Afghanistan
Kenya 32 31 Uganda
Tanzania 36 34 Canada
Colombia 38 38 Poland
Myanmar 43 40 Argentina
46 45 Ukraine
South Africa
47 46 Spain
UK
50 48 South Korea
Congo
62 60
Turkey Italy
65 65
Egypt France
73 67
Ethiopia Thailand
80 75
Philippines Iran
82 81 Germany
Japan
94 87 Vietnam
Bangladesh
127 112
Mexico
Pakistan
151 142
Russia
Indonesia
177 158
Nigeria
India 237 190 Brazil
USA
312
1210
1339