我需要将这两个饼图并排放置……以干净、得体的方式放置,同时不超出页边距。目前还可以,但并不令人满意。使用饼图定位pos={-3,0}
似乎不起作用,小页面尺寸也不起作用。请指导!
\documentclass[12pt]{article}
\usepackage{pgf-pie}
\begin{document}
\begin{figure}
\centering
\begin{minipage}{.3\textwidth}
\begin{tikzpicture}
\pie[cloud, hide number, explode=0, text=pin, rotate=270, pos={-1,0}]
{
94/China(94\%),
6/Other (6\%)
}
\end{tikzpicture}
\end{minipage}%
\hfill
\begin{minipage}{.59\textwidth}
\centering
\begin{tikzpicture}
\pie[cloud, hide number, explode=0, text=pin, rotate=90]
{
40.8/Kazakhstan (41\%),
18.8/Pakistan (19\%),
17/Azerbaijan (17\%),
8.3/Uzbekistan (8\%),
6.4/Turkmenistan (6\%),
4.3/Mongolia (4\%),
1.8/Georgia (2\%),
1.6/Kyrgyzstan ($\sim$2\%),
1.4/Afghanistan ($\sim$1\%),
0.5/Tajikistan ($\sim$1\%)
}
\end{tikzpicture}
\end{minipage}
\end{figure}
\end{document}
答案1
您需要定义最大圆的半径:
\documentclass[12pt]{article}
\usepackage{pgf-pie}
\usepackage{siunitx}
\begin{document}
\begin{figure}
\centering
\begin{minipage}{.3\textwidth}
\begin{tikzpicture}
\pie[cloud, hide number, explode=0, text=pin, rotate=270,
radius=1.5] % <---
{
94/China(\qty{94}{\%}),
6/Other (\qty{6}{\%})
}
\end{tikzpicture}
\end{minipage}\hfill%
\begin{minipage}{.6\textwidth}
\centering
\begin{tikzpicture}
\pie[cloud, hide number, explode=0, text=pin, rotate=90,
radius=1.5]
{
40.8/Kazakhstan (\qty{41}{\%}),
18.8/Pakistan (\qty{19}{\%}),
17/Azerbaijan (\qty{17}{\%}),
8.3/Uzbekistan (\qty{8}{\%}),
6.4/Turkmenistan (\qty{6}{\%}),
4.3/Mongolia (\qty{4}{\%}),
1.8/Georgia (\qty{2}{\%}),
1.6/Kyrgyzstan (\qty{\sim2}{\%}),
1.4/Afghanistan (\qty{\sim1}{\%}),
0.5/Tajikistan (\qty{\sim1}{\%})
}
\end{tikzpicture}
\end{minipage}
\end{figure}
\end{document}