如何绘制 kiviat 图?

如何绘制 kiviat 图?

如何绘制如下的 kiviat 图? 在此处输入图片描述

答案1

像这样?

\documentclass[margin=3mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{intersections}

\begin{document}

\begin{tikzpicture}[thick]
 \foreach \r in {0.5,1,1.5,...,2}{
 \draw (0,0) circle (\r cm);}
\foreach \t/\skl [count=\i]in {45/skill 1,90/skill 2,135/skill 3,180/skill 4,225/skill 5,270/skill 6,315/skill 7,360/skill 8}{
 \draw (0,0) --++ (\t:2)coordinate(\i);
\node at (\t:2.75) {\bfseries \skl}; }
\foreach \s [count=\i] in {0.96,0.8,0.93,1,0.42,0.4,0.2,0.43}{
\path (0,0) --  coordinate[pos=\s] (A\i)(\i);}
%\draw (A)--++(45:2);
 \foreach \j/\i in {1/2,2/3,3/4,4/5,5/6,6/7,7/8,8/1}{
 \draw [cyan,ultra thick] (A\j)--(A\i);}
\foreach \k in {1,2,...,8}
 \draw [fill=white] (A\k) circle (2pt);
\end{tikzpicture}

\end{document}

在此处输入图片描述

答案2

这个tkz-kiviat包可以做令人惊奇的事情:

\documentclass[]{article}
\usepackage{tkz-kiviat} 
\usetikzlibrary{arrows}

\begin{document} 
\begin{tikzpicture}
\tkzKiviatDiagram[lattice = 5]{Skill 1, Skill 2, Skill 3, Skill 4,Skill 5}
\tkzKiviatLine[mark=ball,mark size=4pt,color =red](2,3.75,1,1.5,2)    
\end{tikzpicture}

\end{document}

在此处输入图片描述

答案3

一个小的变化/改进@ferahfeza回答:

\documentclass[tikz, margin=3mm]{standalone}

\begin{document}
    \begin{tikzpicture}
\foreach \r in {0.5,1,...,2}{
    \draw (0,0) circle (\r cm);}
\foreach \s [count=\i from 0, count=\j] in {0.96,0.8,0.93,1,0.42,0.4,0.2,0.43}
{
\pgfmathsetmacro{\k}{int(Mod(\i+1,8))}
\draw (0,0) -- ++ (\k*45:2) coordinate[label=\k*45: skill \j] (aux); 
\node (A\i) [circle, draw, semithick, fill=white, inner sep=1.6pt] at (\k*45:2*\s) {};
}    
\foreach \i in {0,...,7}
{
\pgfmathsetmacro{\k}{int(Mod(\i+1,8))}
\draw[very thick, blue] (A\i) -- (A\k);
}
    \end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容