答案1
无视建议不要使用这种图表,绘制这些类型的东西相当简单,只需绘制一些arc
s 即可。我没有尝试匹配颜色,或制作任何漂亮的界面。
\documentclass[border=5mm]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\foreach [count=\i] \total/\clr in {80/blue,60/red,45/green,25/cyan}
\draw [line width=2mm,\clr]
(0.5cm+\i*3mm,0)
node[above,inner sep=0pt,black,font=\scriptsize]{\total}
arc[start angle=0,radius=0.5cm+\i*3mm,delta angle=-3.60*\total];
\matrix [every node/.style={right=1.5mm,black,font=\small}] at (2,2) {
\fill[blue] circle[radius=2mm] node {Iceland}; \\
\fill[red] circle[radius=2mm] node {Switzerland}; \\
\fill[green] circle[radius=2mm] node {USA}; \\
\fill[cyan] circle[radius=2mm] node {Turkey}; \\
};
\end{tikzpicture}
\begin{tikzpicture}
\foreach [count=\i] \total/\clr in {10/cyan,20/green,30/red,50/blue}
\draw [line width=2mm,\clr]
(-0.5cm-\i*2.5mm,0)
% node[above,inner sep=0pt,black,font=\scriptsize]{\total}
arc[start angle=180,radius=0.5cm+\i*2.5mm,delta angle=3.60*\total];
\begin{scope}[every node/.style={above,anchor=south west,inner sep=0.5pt,xshift=-2mm,font=\scriptsize}]
\node [cyan] (I) at (0,0.2) {Italian};
\node [green] (F) at (I.north west) {French};
\node [red] (E) at (F.north west) {English};
\node [blue] (H) at (E.north west) {Hungarian};
\end{scope}
\end{tikzpicture}
\end{document}
答案2
这轮图我写的包,可以使用。
每个环都放置在单独的 中\wheelchart
。
值(在键中使用total angle
)和颜色(在键中使用slices style
)在循环中定义\foreach
。此循环的计数器\n
用于键中radius
,将内半径设置为1+\n
,将外半径设置为2+\n
。此后,这些半径将使用键进行修改gap radius
,以创建环之间的间隙。
\documentclass[border=6pt,dvipsnames]{standalone}
\usepackage{wheelchart}
\begin{document}
\begin{tikzpicture}
\foreach\WCvalue/\WCcolor [count=\n] in {80/Yellow,60/Green,40/Blue,25/Red}{
\wheelchart[
data=,
gap radius=0.1,
radius={1+\n}{2+\n},
slices style=\WCcolor,
start angle=0,
total angle={\WCvalue*3.6}
]{1}
\node[above] at ({1.5+\n},0) {$\WCvalue$};
}
\end{tikzpicture}
\end{document}