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.

What would be the best way of drawing a political spectrum diagram like this one:

example

share|improve this question
1  
Definitely TikZ, check texample.net/tikz/examples for a suitable starting point. –  Uwe Ziegenhagen Nov 30 '12 at 17:11

5 Answers 5

up vote 12 down vote accepted

enter image description here

\documentclass{article}

\usepackage{graphics}

\begin{document}

\fbox{\begin{picture}(200,200)
\thicklines
\put(100,10){\line(0,1){180}}
\put(10,100){\line(1,0){180}}
\put(100,190){\makebox(0,0)[b]{\textsc{TiKZ}}}
\put(100,10){\makebox(0,0)[t]{\textsc{PsTricks}}}
\put(10,100){\makebox(0,0)[r]{\rotatebox{90}{\textsc{Picture Mode}}}}
\put(190,100){\makebox(0,0)[l]{\rotatebox{-90}{\textsc{MetaPost}}}}
\put(50,150){\makebox(0,0){Easy}}
\put(150,150){\makebox(0,0){Hard}}
\put(50,50){\makebox(0,0){Clear}}
\put(150,50){\makebox(0,0){Obscure}}

\end{picture}}
\end{document}
share|improve this answer
2  
I should add that apart from giving a bias towards picture mode, the placement of the other packages is arbitrary:-) –  David Carlisle Nov 30 '12 at 17:25
    
Thank you, this is perfect. –  ℝaphink Nov 30 '12 at 22:48
2  
Shouldn't the adjectives be on the lines and the packages be in the boxes? –  asmeurer Dec 1 '12 at 3:29
    
How is it possible to automatically scale this image to the page? –  ℝaphink Dec 1 '12 at 8:29
    
@asmeurer you'd better vote for Jake's version:-) –  David Carlisle Dec 1 '12 at 11:36

This is quite straightforward with »tikZ/PGF«.

\documentclass[11pt]{standalone}
\usepackage[T1]{fontenc}
\usepackage{tikz}

\begin{document}
  \begin{tikzpicture}
    \draw (0,6)  node[above]                 {Freedom}  -- (0,-6) node[below]                 {Authority}
          (-6,0) node[xshift=-6pt,rotate=90] {Equality} -- (6,0)  node[xshift=6pt,rotate=-90] {Inequality};
    \node at (-3,3) {Social Democracy};
    \node at (3,3) {Classical Liberalism};
    \node at (-3,-3) {Communism};
    \node at (3,-3) {Facism};
  \end{tikzpicture}
\end{document}

enter image description here

share|improve this answer

I would (of course) use PGFPlots for this. Once the axis is set up, you can add your data in a really easy and clear way:

Difficulty Clarity Package
0.8        0.6     PSTricks
0.6        0.8     TikZ

\documentclass{article}
\usepackage{pgfplots}

\begin{document}
\begin{tikzpicture}
\begin{axis}[
    xmin=-1, xmax=1,
    ymin=-1, ymax=1,
    axis equal image,
    xtick=\empty, ytick=\empty,
    axis lines*=middle,
    after end axis/.code={
        \node at (current axis.right of origin) [anchor=west] {Easy};
        \node at (current axis.left of origin) [anchor=east] {Hard};
        \node at (current axis.above origin) [anchor=south] {Clear};
        \node at (current axis.below origin) [anchor=north] {Obscure};
    }
]

\addplot [
    nodes near coords, 
    mark=*, 
    only marks, 
    point meta=explicit symbolic
] table [meta=Package] {
    Difficulty Clarity Package
    0.8 0.6 PSTricks
    0.6 0.8 TikZ
};
\end{axis}
\end{tikzpicture}
\end{document}
share|improve this answer
1  
I suppose I'd better give you +1 :-) –  David Carlisle Nov 30 '12 at 18:39

An option using the positioning library from tikz

screenshot

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning}
\begin{document}

\begin{tikzpicture}[node distance=5cm]
  \node(origin) at (0,0){};
  % nodes on horizontal and vertical
  \node(freedom)[above=of origin]{FREEDOM};
  \node(authority)[below=of origin]{AUTHORITY};
  \node(equality)[left=of origin]{\rotatebox{90}{EQUALITY}};
  \node(inequality)[right=of origin]{\rotatebox{-90}{INEQUALITY}};
  % nodes on diagonals
  \node(socdemo)[above left=3cm of origin]{Social democracy};
  \node(classlib)[above right=3cm of origin]{Classical liberalism};
  \node(facism)[below right=3cm of origin]{Facism};
  \node(facism)[below left=3cm of origin]{Communism};
  % connect horizontal and vertical nodes
  \draw(equality)--(inequality);
  \draw(freedom)--(authority);
\end{tikzpicture}
\end{document}
share|improve this answer

A version in Metapost, to show a couple of useful features.

enter image description here

prologues := 3;
outputtemplate := "%j%c.eps";
beginfig(1);
path xx, yy; 
xx = (left--right) scaled 5cm; 
yy = xx rotated 90;

draw xx;
draw yy;

defaultfont := "qx-qtmr-sc";
label.bot("Authority", point 0 of yy);
label.top("Freedom",   point 1 of yy);
label.lft("Equality"   infont defaultfont rotated +90, point 0 of xx);
label.rt ("Inequality" infont defaultfont rotated -90, point 1 of xx);

defaultfont := "qx-qtmr";
label("Classical Liberalism", 1/2[point 1 of xx, point 1 of yy]);
label("Social Democracy",     1/2[point 0 of xx, point 1 of yy]);
label("Communism",            1/2[point 0 of xx, point 0 of yy]);
label("Facism",               1/2[point 1 of xx, point 0 of yy]);

setbounds currentpicture to bbox currentpicture scaled 1.05;

endfig;
end.

Notes

  • There's only one number --- 5cm to scale the x-axis. Everything else is positioned relative to this. This means you can rescale the whole figure with minimal effort when required.

  • For a path p with a single segment point 0 of p is the beginning, and point 1 of p is the other end.

  • If a and b are points (defined as pair) then 1/2[a,b] is the point half way between them.

  • It's helpful to be familiar with the contents of your local psfonts.map file, in order to choose the right fonts in the right encodings for Metapost. Here I've picked out TeX Gyre Termes in regular and regular-small-caps style, and in the qx encoding.

    In plain Metapost strings like this you are limited to ASCII characters, so the only thing that matters about the choice of encoding is that the characters from 0x20 to 0x7e are mapped as you expect. If you want accents and or maths in your labels, then you need to call TeX with the btex and etex mechanism. For full flexibility and to automatically use your document fonts investigate the gmp package, or luamplib.

  • If you keep your diagram centered on the origin, then the setbounds trick at the end adds a margin all round your drawing.

share|improve this answer
    
Complementary note: For the LaTeX users who do not want to use LuaLaTeX and thus luamplib, I think that the most powerful and flexible solution for labels management is the latexmp package (which can be used with gmp). This at the cost of a double compilation, which can be automatized anyway: ctan.org/pkg/latexmp –  Franck Pastor Apr 15 at 11:43

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.