2

Is there any way I can change the grad scale values generated with the help of \tkzKiviatGrad to non numeric values like normal, flavorful and intense instead of 1,2,3. I'd checked out the documentation but couldn't find anything useful.

This is my current code snippet:

\documentclass[12pt]{article}
\usepackage{tkz-kiviat,numprint,fullpage} 

\begin{document}

\begin{tikzpicture}
\tkzKiviatDiagram[radial  style/.style={gray!50}, scale=1, gap=1, lattice=3]{pineapple,mango,durian}
    \tkzKiviatLine[thick,
                           color      = orange,
                           ball color = orange,
                           mark size  = 4pt,
                           fill       = orange!20](1,2,3)
\tkzKiviatGrad[](3)  
\end{tikzpicture}

\end{document}

If I compile it then it looks like the following: enter image description here

What I try to achive is something like this: enter image description here

Any ideas are highly appreciated.

2

Since you have already a tikzpicture, you could keep the diagram and just add the labels.

\documentclass[12pt]{article}
\usepackage{tkz-kiviat,numprint,fullpage} 

\begin{document}

\begin{tikzpicture}
\tkzKiviatDiagram[radial  style/.style={gray!50}, scale=1, gap=1, 
lattice=3]{pineapple,mango,durian}
    \tkzKiviatLine[thick,mark=ball,
                           color      = orange,
                           ball color = orange,
                           mark size  = 4pt,
                           fill       = orange!20](1,2,3)
%\tkzKiviatGrad[](3)  
\foreach \X [count=\Y]in {normal, flavorful, intense}
\node[anchor=north,rotate=-30] at (\Y,0) {\X};
\end{tikzpicture}
\end{document}

enter image description here

  • Creative :) Why I did not think of this :) – user156344 May 20 at 13:23
  • 1
    @JouleV Must be related to our hibernation habits. ;-) – user121799 May 20 at 13:29
  • Thanks for your suggestion. Exactly what I needed! @JouleV Also thanks for your assistance and pointing in the right direction. You've both been a great help! – lxndrblz May 20 at 14:02
2

tkz-kiviat is based on TikZ, so let's use the more powerful and customizable TikZ! Well, it is not complicated at all...

\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}
\filldraw[fill=orange!20,draw=orange,thick] (1,0) -- (120:2) -- (-120:3) -- cycle;
\draw[help lines] (0,0) -- (3.5,0) node[right,black] {pineapple};
\draw[help lines] (0,0) -- (120:3.5) node[above left,black] {mango};
\draw[help lines] (0,0) -- (-120:3.5) node[below left,black] {durian};
\draw[help lines] foreach \i in {1,2,3} {(\i,0) -- (120:\i) -- (-120:\i) -- cycle};
\foreach \i [count=\j] in {normal,flavorful,intense} 
    \path (\j,0) node[below,font=\tiny\sffamily] {\i};
\end{tikzpicture}
\end{document}

enter image description here

  • Thanks for your swift and promising response! My original intention for using tkz-kiviat is that in a more complex scenario I'll be loading the fruits and their values from a .dat file. Is there any way I could reuse your foreach loop to sort of override the labels? – lxndrblz May 20 at 8:15
  • @lxndrblz What do you mean by "sorting" the labels? – user156344 May 20 at 8:21
  • 1
    @lxndrblz If you like an answer and it was helpful, please consider upvoting (by clicking on the arrows next to the score) and marking it as accepted answer (by clicking on the checkmark ✓). – Andrew May 20 at 8:22
  • @JouleV I didn't mean sorting in the sense of arranging the items, but "sort of overriding" like replacing them. Does that make sense? Sorry for any confusion. – lxndrblz May 20 at 8:45
  • @lxndrblz Yes. You only have to substitute {normal,flavorful,intense} with a list surrounded by braces, separated by commas, e.g. {lxndrblz,abc,def,ghi}. That's all. I don't think I will ever need anything other than TikZ to draw such figures. – user156344 May 20 at 8:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.