-2

How can I draw a wheel of names like this in LaTeX?

enter image description here

Flow
  • 1,013
  • 2
    There are surely lots of examples on this site already. What did you try? Where did you get stuck exactly? – Jasper Habicht Dec 29 '23 at 16:29
  • Unfortunately, there are no examples for a "wheel of names" on this site. I only could find questions of about wheelcharts, which is a different kind of wheel: it is a chart used to represent figures. I got stuck pretty early as I have no idea how to build such a thing. – Flow Dec 30 '23 at 11:53
  • 1
    Well, there might not be wheels with names, but there are several examples for pie charts on this site for example here. – Jasper Habicht Dec 30 '23 at 17:37

1 Answers1

3

The answer below uses the wheelchart package, which I wrote.

The colors are defined with a list using the key slices style{list}.

In the key wheel data style we use \WClistcolors which refers to items in the list given to the key WClistcolors.

enter image description here

\documentclass[border=6pt]{standalone}
\usepackage{wheelchart}
\begin{document}
\begin{tikzpicture}
\sffamily
\wheelchart[
  data=,
  radius={0.5}{3},
  slices style{list}={yellow,red,blue,green},
  start angle=40,
  value=1,
  WClistcolors={black,white,white,black},
  wheel data=\WCvarA,
  wheel data style={rotate=\WCmidangle,\WClistcolors}
]{%
  Hanna,
  Gabriel,
  Fatima,
  Eric,
  Diya,
  Beatriz,
  Ali%
}
\end{tikzpicture}
\end{document}
matexmatics
  • 4,819
  • 1
    I wanted to give your solution a try so I copied your code and wanted it to compile with lualatex (WinEdt). I end up with an error in line 25 (the closing bracket) that "The control sequence at the end of the top line of your error message was never \def'ed." Can you help me please? – mario1000 Dec 29 '23 at 18:46
  • @mario1000 The code in the answer requires version 2.0 of the wheelchart package. The version can be verified in the .log file, which should contain wheelchart 2023/12/03 v2.0. Version 2.0 can be downloaded from CTAN. – matexmatics Dec 29 '23 at 20:51
  • 1
    @mario1000 If there is still a problem after that, then the version of expl3 is not up to date enough. Then it is probably sufficient to put the following before \usepackage{wheelchart}:

    \ExplSyntaxOn \cs_generate_variant:Nn \tl_gset:Nn { Ne } \cs_generate_variant:Nn \str_case:nnF { enF } \cs_generate_variant:Nn \tl_set:Nn { Ne } \cs_generate_variant:Nn \regex_match:nnTF { nVTF } \cs_generate_variant:Nn \str_case:nn { en } \cs_set_eq:NN \cs_set:Npe \cs_set:Npx \cs_set_eq:NN \cs_set:cpe \cs_set:cpx \ExplSyntaxOff

    – matexmatics Dec 29 '23 at 20:52
  • Your second comment did the trick. Thank you very much! – mario1000 Dec 30 '23 at 05:12