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.

I would need to make a table where the rows consist of concentric circles. That is, row 1 is forms the innermost circle; row 2 the second circle; row 3 the third circle and so on. The columns would thus form pizza slices meeting in the center of the circles.

What I'm trying to do is to recreate a series of tables on the basis of the one pictured below (for what it's worth, the table is from a Jesuit work published in China in 1626). The five instances of one and the same letter ("a", "e", "i" etc) would all be in the same column but on different rows.

I would provide some kind of elementary MWE if I could, but I don't know where to start. I'd appreciate any help I can get. Thank you!

enter image description here

share|improve this question

3 Answers 3

up vote 20 down vote accepted

I’m not sure if this answers “How do I change the list of letters for every row” or not, but:

Here’s the diagram with a different outer row than the inner rows. I used a \foreach loop to “simultaneously” iterate over two variables, \romanized and \outer. (You can easily extend this to more than two variables.) The code is essentially stolen from the previous two answers.

\documentclass[varwidth,border=1em]{standalone}
\usepackage{tikz}
\usetikzlibrary{calc,decorations.text}

\begin{document}
\begin{tikzpicture}
\node at (90:5.5) {\Large 萬國音韻話圖};
\def\ct{30}
\def\halfring{ʿ}
\foreach \romanized/\outer [count=\i] in {
    % No guarantees that the Chinese characters are correct
    a/丫, e/額, i/衣, o/阿, u/午, ç/則, \halfring ç/測, ch/者, \halfring ch/搐,
    k/格, \halfring k/克, p/克, \halfring p/魄, t/德, \halfring t/忒, j/日, v/物,
    f/弗, g/額, l/勒, m/麥, n/搦, s/色, x/石, h/黑, b/〇, d/〇, r/〇, z/〇,
} {
    \pgfmathsetmacro{\angle}{90-360/\ct*\i}
    \draw (\angle-360/\ct/2:1.5) -- (\angle-360/\ct/2:4.5);
    \node[rotate=-90+\angle] at (\angle:4.25) {\outer};
    \foreach \r in {1,...,5} {
        \pgfmathsetmacro{\radius}{1.25+\r*0.5}
        \node[rotate=-90+\angle,text depth=0,text height=1ex] at (\angle:\radius)
             {\sffamily\itshape\romanized};
    }
}
\foreach \r in {1,...,8,8.1} { \draw (0,0) circle(0.5+\r*0.5); }
\foreach \inner [count=\i] in {次淸甚,次濁甚,次上甚,次去甚,次入甚} {
    \pgfmathsetmacro{\angle}{90-360/5*\i-360/\ct/2}
    \draw (\angle:1) -- (\angle:1.5);
    \draw[decorate, decoration={reverse path, text align=center,
          text along path, text={\inner}}] (\angle:1.125) arc (\angle:\angle+360/5:1.125);
};
\end{tikzpicture}
\end{document}

share|improve this answer
1  
Looks nice but you may have spoilt Marten's entire afternoon as he must have been looking forward to figuring out himself how to do this... –  Marc van Dongen May 21 at 12:11
    
That is beautiful and looks exactly like what I need. I haven't explored it yet to see that it can do all that I need, but I will right away. But I just have one question now. How do I change the Latin font in the picture? I tried to add \begin{tikzpicture}[font=\mainfont] and the like but it doesn't work. –  Mårten May 22 at 7:06
    
From my preamble: \usepackage{fontspec} \setmainfont{Adobe Kaiti Std} \setsansfont{Brill}. Since there were only really two fonts needed, I sort of “cheated” by (ab)using the “serif” family for the Chinese characters and the “sans-serif” family (\sffamily) for the Latin characters. –  hftf May 22 at 7:27
    
I got everything working, and managed to adapt it to reconstruct a similar graph. Thanks a million! –  Mårten May 24 at 5:31
    
No problem. Sorry if I spoiled your afternoon — I didn’t realize I wasn’t supposed to post this… –  hftf May 24 at 7:04

Starting point:

\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\usetikzlibrary{calc}
\begin{tikzpicture}
\foreach \letter [count=\i] in {q,w,e,r,t,y,u,i,o,p,a,s,d,f,g,h,j,k,l,z,x,c,v,b, → n,m} {
 \pgfmathsetmacro{\angle}{-360/26*\i}
 \draw (\angle-360/26/2:1.25) -- (\angle-360/26/2:4.75);
 \foreach \r in {1,...,7} {
    \pgfmathsetmacro{\radius}{1+\r*0.5}
    \node[rotate=-90+\angle] at (\angle:\radius) {\letter};
 }
}
 \foreach \r in {1,...,8}  {
     \draw (0,0) circle(0.75+\r*0.5);
}
\end{tikzpicture}
\end{document}

Result

share|improve this answer
3  
Beautiful! Sorry, I don't know tikz very well; how do I change the list of letters for every row? In case not all rows will contain the same sequence of letters. Thank you! –  Mårten May 21 at 9:34

Another attempt where text can be written onto it via \curvedtext taking 4 argumments #1=angle, #2=radius, #3=color, #4=content. This solution uses foreach loop to draw the circles and rays.

\foreach \rr in {5,10,...,25}{  % radius can be adjusted for one's selection.
  \draw  (A) circle (\rr);
}
\foreach \aa in {1,...,\pp}{
\draw ($(A)+({\aa*360/\pp}:10)$) --  ($(A)+({\aa*360/\pp}:25)$); 
}

To draw the rays, one needs to provide \pp for number of slices. This example has 20 slices. So each slice is 18 degree. With that information, one can determine the location (polar coordinates) of each slots to put text in.

enter image description here

Code

\documentclass[border=10pt]{standalone}%{article}
%\usepackage[papers=30cm,paperwidth=35cm,margin=1in,heightrounded]{geometry}
\usepackage{tikz}
\usetikzlibrary{calc,decorations.text}
\usetikzlibrary{calc}
\def\curvedtext#1#2#3#4{%
\path[decorate, decoration={text along path, text align=center, text={|\color{#3}\small|#4}}]
($(A)+(#1+20:#2)$) arc (#1+20:#1-20:#2);
}    % borrowed from http://tex.stackexchange.com/a/177455/34618
\begin{document}
\thispagestyle{empty}
\begin{tikzpicture}[scale=0.2]
% center
\path  (0,0) coordinate(A);
% circles
\foreach \rr in {5,10,...,25}{
  \draw  (A) circle (\rr);
}
\def\pp{20} % nb of slices
% rays
\foreach \aa in {1,...,\pp}{
\draw ($(A)+({\aa*360/\pp}:10)$) --  ($(A)+({\aa*360/\pp}:25)$); 
}
\curvedtext{45}{22}{blue}{ABC};
\curvedtext{27}{22}{blue}{DEF};
\curvedtext{9}{22}{blue}{HIJ};
\curvedtext{25}{17}{red}{B};
\curvedtext{7}{12}{green!60!black}{C};
\path[draw,decorate, decoration={text along path, text align=center, text={A very long sentence around the circular path and...}}] (0,0) circle (8);
\end{tikzpicture}
\end{document}
share|improve this answer
    
Thanks, this will be very helpful for me! –  Mårten May 24 at 5:31

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.