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 am attempting to generate a circular path with nodes:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows}
\begin{document}
\begin{tikzpicture}
\node (1) at (8,6) {A11};
\node (2) [below left of = 1] {B22};
\node (3) [below right of = 2] {C33};
\node (4) [below right of = 1] {D44};
% connect the dots
\path[->,>=stealth]
(1) edge [bend right] node[left] {} (2)
(2) edge [bend right] node[left] {} (3)
(3) edge [bend right] node[right] {} (4)
(4) edge [bend right] node[right] {} (1);
\end{tikzpicture}
\end{document}

Image

However, something doesn't seem quite right here, I think it doesn't look right due to the arrows not being quite long enough. I gather this is most likely due to the nodes being too large to accommodate a circular path for the arrows, but I was hoping someone might have a work around for this issue? Please note that this is included in a larger diagram so its size must remain relatively small. Also I realize I can reduce the entire font size which seems the produce a better outcome by

\tikzstyle{every node}=[font=\tiny]
share|improve this question
3  
Bend right option is not exactly a circular pattern and arrowheads visually alter the path they are drawn on. You can add this \node[circle,minimum size=1.414cm,draw] (a) {}; \foreach \x[count=\xi] in {A,...,D}{\node[fill=white] at (a.90*\xi){\x\xi\xi};} and compare the difference. –  percusse Mar 3 '13 at 12:46

2 Answers 2

up vote 11 down vote accepted

The following approximation is good enough. I also added a true circle (in pink) for comparison:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc}
\usetikzlibrary{arrows}

\begin{document}
\begin{tikzpicture}[every node/.style={inner sep=1pt}]
  \node (1) at (8,6) {A11};
  \node (2) [below left of = 1] {B22};
  \node (3) [below right of = 2] {C33};
  \node (4) [below right of = 1] {D44};
  % True circle
  \draw[red, opacity=.3] ($(1)!.5!(3)$) circle (6.5mm);
  % connect the dots
  \path[->,>=stealth]
  (1) edge [bend right=20]  (2)
  (2) edge [bend right=20]  (3)
  (3) edge [bend right=20]  (4)
  (4) edge [bend right=20]  (1);
\end{tikzpicture}
\end{document}

Result:

Result

share|improve this answer

As an alternative, especially if you don't need to 'tweak' the diagrams, you might care to try Claudio Fiandrino's smartdiagram package (available in TeX Live).

Here's a very simple example, with absolutely no tuning, but, I think, surprisingly compact for a LaTeX answer:

\documentclass[10pt]{article}
\usepackage{smartdiagram}
\begin{document}
\smartdiagram[circular diagram]{A11,B22,C33,D44}
\end{document}

Of course, you can alter the colours, shapes, etc. -- the details are in the manual.

enter image description here

share|improve this answer
    
@egreg : Thank you for adding the picture. –  Brent.Longborough Mar 3 '13 at 14:54

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.