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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

I have 5 properties and I thought that visualizing them along the axis of a pentagon would be nice. The properties can take an integer value between 0-5. Together that span a surface within the pentagon.

This is what I'd would like the image to look like [took me forever to make the markers in inkscape :-)] :

enter image description here

This is what I have so far:



\node[draw=black, minimum size=\R,regular polygon,regular polygon sides=5] (a) {};
\draw (a.center) -- (a.north)    node[above] {Property1};
\draw (a.center) -- (a.corner 5) node[right] {Property2};
\draw (a.center) -- (a.corner 4) node[right] {Property3};
\draw (a.center) -- (a.corner 3) node[left]  {Property4};
\draw (a.center) -- (a.corner 2) node[left]  {Property5};

\draw [thin,black!20] circle (\R) ;
\fill[red] circle (2pt);

% Trial/error for this example
%                              P1        P2           P3              P4             P5
\draw[fill=cyan, opacity=0.8] (0,1.5) -- (0.9,0.3) -- (0.55, -0.8) -- (-0.6,-0.8) -- (-1.4,0.45) -- cycle;



Resulting in this:

enter image description here

I'm lost at drawing the markers on the vertexes and having them equally spaces and equally lost when it comes to filling the polygon given by the 5 integer-values

Since I have quite a few of these to draw, making the above into a macro would be really nice :-)

share|improve this question

marked as duplicate by Benedikt Bauer, Werner, zeroth, Heiko Oberdiek, Peter Grill Mar 6 '14 at 21:45

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

cool, didn't know thay were called Kiviat diagrams – Fredrik Pihl Mar 6 '14 at 20:57
up vote 3 down vote accepted

Here's a manual implementation using pstricks. As such, compile with either LaTeX or XeLaTeX:

enter image description here

\usepackage{pstricks}% http://tug.org/PSTricks/main.cgi/
\usepackage{multido,xcolor}% http://ctan.org/pkg/{multido,xcolor}

    (#2;90)(#3;162)(#4;234)(#5;306)(#6;18)% Property polygon


  \SpecialCoor% Allow for polar coordinate specifications
  \pscircle[linecolor=black!20](0,0){1.2}% Outer circle

    \psline(0,0)(1;\iB)% Radial line outward
      \rput{\number\numexpr\iB+90\relax}(\rC;\iB){\psline(-2pt,0)(2pt,0)}}% Ticks are 4pt in length
    \rput{0}(1.1;\iB){\iA}% Property #s

  \pspolygon(1;90)(1;162)(1;234)(1;306)(1;18)% Outer pentagon



\proppoly[<options>]{<p1>}{<p2>}{<p3>}{<p4>}{<p5>} plots a polygon containing the values of properties <p1>, <p2>, <p3>, <p4> and <p5> with options <options>.

You could add multiple \proppolys on top of one another:

enter image description here

share|improve this answer

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