Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.
\documentclass[twoside,a4paper,12pt]{article}
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
\usepackage[upright]{fourier}
\usepackage{tkz-kiviat,numprint,fullpage}
\usetikzlibrary{arrows}
\usepackage{polyglossia}
\setmainlanguage{magyar}
\begin{document}


\begin{tikzpicture}
\tkzKiviatDiagram[label distance=.5cm, scale=0.3]{Introvertált,Oldott,Extrovertált,Feszült}
\tkzKiviatLine[thick,color=blue,mark=none,
               fill=blue!20,opacity=.5](
        37.5,
        50.0,
        13.3333333333,
        10.5263157895
    )
\tkzKiviatGrad[prefix=,unity=10,suffix=\ \%](1)
\end{tikzpicture}

\end{document}

Result:

enter image description here

For some reason, the 100% value in the lattice looks smaller than value=50. I could not find out how to adjust the diagram so that data remains inside the axes.

Another question: if I don't scale the whole diagram by 0.3, then it goes off the page. Why is that? Is it possible to adjust the diagram to textwidth of the current page?

share|improve this question

2 Answers 2

up vote 6 down vote accepted

You can find a french (sorry) documentation here

The number of latices is determined by an option : lattice. By default the number of lattices is 10. You need to use number between 0 and 10 to draw a kiviat line if you keep the default number. The number determines the lattice, for example you can use 20 lattices :

\documentclass[]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[upright]{fourier}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{tkz-kiviat,numprint,fullpage}
\usetikzlibrary{arrows}
\thispagestyle{empty}

\begin{document} 

\begin{tikzpicture} [scale=.5]
   \tkzKiviatDiagram[lattice=20]{A,B,C,D,E} 
   \tkzKiviatLine[thick,
                  color      = blue,
                  mark       = ball,
                  mark size  = 4pt,
                  fill       = blue!20,
                  opacity=.5](4,3,20,15,10)
\end{tikzpicture} 
\end{document} 

enter image description here

But I think it's preferable to keep 10 in a great majority of cases. If you have 5 lattices, you need to use numbers between 0 and 5.

Update

With two grades :

\begin{tikzpicture}
\tkzKiviatDiagram[scale   = .6,
                  gap = 1,
                  lattice = 5]{%
McCabe,LOC,Live Variables,Halstead N,Variablenspanne}
\tkzKiviatLine[thick,color=blue,mark=none,
               fill=blue!20,opacity=.5](3,3.5,3,3.5,3)
\tkzKiviatLine[thick,color=darkgray,
               fill=green!20,opacity=.5](0.5,1,0.5,0.75,1)
\tkzKiviatLine[ultra thick,mark=ball,
                 mark size=4pt,color =Maroon](2,3.75,1,1.5,2)
\tkzKiviatGrad[prefix=,unity=100,suffix=\ \texteuro](1) 

\tkzKiviatGrad[prefix=,unity=20,suffix=\ \%](3)  
\end{tikzpicture}

enter image description here

It's also possible to use tikz to create a diagram but you need to look at the code to know some coordinates used in the drawing. it's possible !

share|improve this answer
    
All right, so the number of lattices equals to the maximum number that can be represented on the diagram. I have also figured out that the unit parameter of the tkzKiviatGrad determines the granularity of the labels. One last question: how do I specify two different tkzKiviatGrad instances? E.g. put percent values on one axis, and put "real" values on another? –  nagylzs Oct 29 '12 at 8:05
1  
I updated my answer. If you need some specific tools, I can try to do create something. –  Alain Matthes Oct 29 '12 at 8:49

I am not sure if this is what you are trying to achieve (I suppressed the accents):

\documentclass[twoside,a4paper,12pt]{article}
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
\usepackage[upright]{fourier}
\usepackage{tkz-kiviat,numprint,fullpage}
\usetikzlibrary{arrows}

\begin{document}

\begin{tikzpicture}
\tkzKiviatDiagram[label distance=.5cm]{Introvertalt,Oldott,Extrovertalt,Feszult}
\tkzKiviatLine[thick,color=blue,mark=none,
               fill=blue!20,opacity=.5](
        3.75,
        5.00,
        1.33333333333,
        1.05263157895
    )
\tkzKiviatGrad[unity=10,suffix=\ \%](1)
\end{tikzpicture}

\end{document}

enter image description here

share|improve this answer
    
Does it mean that I have to scale all values into [0,10]? Is this a fixed range, or can this be changed? I'm asking because I could not find any documentation on the kiviat package. Just some examples. All examples used values between 0 and 10. But options are not explained anywhere. In some cases I'll have to use data with very different ranges (for example: [0,3.5e-6]) and it would be great to use the original values. Where is this number 10 coming from? Why it is not 1 or 100 or anything else in particular? –  nagylzs Oct 29 '12 at 7:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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