[Tex/LaTex] TikZ/PGF linguistics vowel chart

linguisticstikz-pgf

I'm including a vowel chart in a linguistics document of mine, similar to this, and while I'm aware that there are a couple of packages (TIPA, pst-vowel) that can do the job, I'm interested in trying to draw it using PGF/TikZ. Having not used TikZ before, I'm a little unsure on where to start with this deceptively simple figure.

Hungarian Vowels

As I understand it, I'd need to define some kind of skewed grid with [default] nodes at the line intersections, their midpoints, and the middle of each "square". The actual letters would then be drawn on top, positioned by coordinates; at the moment I'm not interested in arbitrary positioning of letters as occurs in the diagram.

Can anyone help me out?

Best Answer

If you don't require PGF/TikZ 3.0, you can use this trick to emulate an affine transformation.

I define a command whose input is a “Cartesian” coordinate in the range (0, 0) to (3, 2), and whose output is a coordinate in the barycentric system¹ defined by the four corners (called hf, hb, lf, and lb) of the trapezoid.

\def\V(#1,#2){barycentric cs:hf={(3-#1)*(2-#2)},hb={(3-#1)*#2},lf={#1*(2-#2)},lb={#1*#2}}

Liberal use of this \V command makes placing nodes in the trapezoid very easy.

Code

\documentclass[12pt]{standalone}

\usepackage{tikz}
% Requires xelatex for the magnificent Brill font
\usepackage{fontspec}
\setmainfont{Brill}

\begin{document}
\begin{tikzpicture}[scale=3]
\large
\tikzset{
    vowel/.style={fill=white, anchor=mid, text depth=0ex, text height=1ex},
    dot/.style={circle,fill=black,minimum size=0.4ex,inner sep=0pt,outer sep=-1pt},
}
\coordinate (hf) at (0,2); % high front
\coordinate (hb) at (2,2); % high back
\coordinate (lf) at (1,0); % low front
\coordinate (lb) at (2,0); % low back
\def\V(#1,#2){barycentric cs:hf={(3-#1)*(2-#2)},hb={(3-#1)*#2},lf={#1*(2-#2)},lb={#1*#2}}

% Draw the horizontal lines first.
\draw (\V(0,0)) -- (\V(0,2));
\draw (\V(1,0)) -- (\V(1,2));
\draw (\V(2,0)) -- (\V(2,2));
\draw (\V(3,0)) -- (\V(3,2));

% Place all the unrounded-rounded pairs next, on top of the horizontal lines.
\path (\V(0,0))     node[vowel, left] {i} node[vowel, right] {y} node[dot] {};
\path (\V(0,1))     node[vowel, left] {ɨ} node[vowel, right] {ʉ} node[dot] {};
\path (\V(0,2))     node[vowel, left] {ɯ} node[vowel, right] {u} node[dot] {};
\path (\V(0.5,0.4)) node[vowel, left] {ɪ} node[vowel, right] {ʏ} node[dot] {};
\path (\V(0.5,1.6)) node[vowel, left] { } node[vowel, right] {ʊ} node[dot] {};
\path (\V(1,0))     node[vowel, left] {e} node[vowel, right] {ø} node[dot] {};
\path (\V(1,1))     node[vowel, left] {ɘ} node[vowel, right] {ɵ} node[dot] {};
\path (\V(1,2))     node[vowel, left] {ɤ} node[vowel, right] {o} node[dot] {};
\path (\V(2,0))     node[vowel, left] {ɛ} node[vowel, right] {œ} node[dot] {};
\path (\V(2,1))     node[vowel, left] {ɜ} node[vowel, right] {ɞ} node[dot] {};
\path (\V(2,2))     node[vowel, left] {ʌ} node[vowel, right] {ɔ} node[dot] {};
\path (\V(2.5,0))   node[vowel, left] {æ} node[vowel, right] { } node[   ] {};
\path (\V(3,0))     node[vowel, left] {a} node[vowel, right] {ɶ} node[dot] {};
\path (\V(3,2))     node[vowel, left] {ɑ} node[vowel, right] {ɒ} node[dot] {};

% Draw the vertical lines.
\draw (\V(0,0)) -- (\V(3,0));
\draw (\V(0,1)) -- (\V(3,1));
\draw (\V(0,2)) -- (\V(3,2));

% Place the unpaired symbols last, on top of the vertical lines.
\path (\V(1.5,1))   node[vowel]       {ə};
\path (\V(2.5,1))   node[vowel]       {ɐ};
\end{tikzpicture}
\end{document}

Result

Finally, here is the complete IPA vowel chart drawn in TikZ:

Sorry for the late answer. Still, I hope this helps anyone else wanting to draw this in the future. By the way, you can get the extremely-well-equipped-for-linguistics Brill font here for free.


¹ You can learn about this in section 13.2.2 “Barycentric Systems” of the PGF/TikZ manual.

Related Question