Graphics, Figures & TablesDots in a Circle Diagram

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Latexcommunity1000
Posts: 7
Joined: Sun Jan 29, 2012 11:27 pm

Dots in a Circle Diagram

Post by Latexcommunity1000 »

I wish to do a diagram consisting of 8 dots that lie in a circle, with a letter next to each of the dots. How do I do this in LaTeX?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Dots in a Circle Diagram

Post by localghost »

Show what you have tried so far by a minimal example.


Thorsten
User avatar
Stefan Kottwitz
Site Admin
Posts: 10348
Joined: Mon Mar 10, 2008 9:44 pm

Dots in a Circle Diagram

Post by Stefan Kottwitz »

For drawing diagrams in LaTeX, TikZ is a great package. For example, the 8 dots could be drawn this way:

Code: Select all

\documentclass{article}
\usepackage{tikz}
\begin{document}
  \tikz\foreach \i in {1,...,8}
    \node (\i) at (45*\i:1.6) {\textbullet};
\end{document}
dots-circle.png
dots-circle.png (1.28 KiB) Viewed 5483 times
In general, I recommend to start questions or explain problems with some code. Questions, which look like "Please produce a document for me" without any code are not attracting helpful users. In contrast, if you would show some code then it's easier to provide specific help.

Stefan
LaTeX.org admin
Latexcommunity1000
Posts: 7
Joined: Sun Jan 29, 2012 11:27 pm

Re: Dots in a Circle Diagram

Post by Latexcommunity1000 »

I had no code and had not tried as yet tried anything, as I had nothing to try. Not sure what a code is. Do you mean LaTeX commands.


The Latex commands that you have supplied are just what I want. I would also like to write a letter next to each dot. How do I do that? ( I have no idea how to do this, so cannot provide any example.)
User avatar
Stefan Kottwitz
Site Admin
Posts: 10348
Joined: Mon Mar 10, 2008 9:44 pm

Dots in a Circle Diagram

Post by Stefan Kottwitz »

Latexcommunity1000 wrote:Not sure what a code is. Do you mean LaTeX commands.
Yes, I mean a LaTeX example. If you would have a specific problem, try to post complete code, but as minimal as possible, so we could check a problem or improve your code, providing specific help.

In this case, I give an example for a start.
Latexcommunity1000 wrote:I would also like to write a letter next to each dot. How do I do that? ( I have no idea how to do this, so cannot provide any example.)
For example, a bit longer:

Code: Select all

\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[every node/.style={node distance=2ex}]
  \foreach \i in {1,...,8}
    \node (\i) at (45*\i:1.6) {\textbullet};
  \node[right of=1] {L};
  \node[right of=2] {T};
  \node[right of=3] {X};
\end{tikzpicture}
\end{document}
However, be aware that TikZ is a powerful and complex graphic package. It requires some effort to learn that. If you don't want to spend time on learning TikZ, perhaps use just a graphic program. For example use Inkscape, export a drawing into PDF format and use \includegraphics for loading it into your document.

For learning TikZ, type at the command prompt

Code: Select all

texdoc pgf
or download this extensive documentation: PGF Manual. To learn, what TikZ could do for you, you may could visit the TikZ example gallery.

Stefan
LaTeX.org admin
Latexcommunity1000
Posts: 7
Joined: Sun Jan 29, 2012 11:27 pm

Re: Dots in a Circle Diagram

Post by Latexcommunity1000 »

Thanks a lot. That has saved me a lot of time.
Post Reply