diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/circular/doc.lua')
-rw-r--r-- | Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/circular/doc.lua | 56 |
1 files changed, 31 insertions, 25 deletions
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/circular/doc.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/circular/doc.lua index e532e783e11..0bd9090a1c1 100644 --- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/circular/doc.lua +++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/circular/doc.lua @@ -19,20 +19,23 @@ local example = require 'pgf.gd.doc'.example key "simple necklace layout" summary -[[ This simple layout arranges the nodes in a circle, which is -especially useful for drawing, well, circles of nodes. ]] +[[ +This simple layout arranges the nodes in a circle, which is +especially useful for drawing, well, circles of nodes. +]] documentation [[ The name |simple necklace layout| is reminiscent of the more general -``necklace layout,'' a term coined by Speckmann and Verbeek in +``necklace layout'', a term coined by Speckmann and Verbeek in their paper +% \begin{itemize} -\item - Bettina Speckmann and Kevin Verbeek, - \newblock Necklace Maps, - \newblock \emph{IEEE Transactions on Visualization and Computer - Graphics,} 16(6):881--889, 2010. + \item + Bettina Speckmann and Kevin Verbeek, + \newblock Necklace Maps, + \newblock \emph{IEEE Transactions on Visualization and Computer + Graphics,} 16(6):881--889, 2010. \end{itemize} For a |simple necklace layout|, the centers of the nodes @@ -41,7 +44,7 @@ node at the |grow| direction (for |grow'|, the circle is clockwise). The order of the nodes is the order in which they appear in the graph, the edges are not taken into consideration, unless the |componentwise| option is given. - +% \begin{codeexample}[] \tikz[>=spaced stealth'] \graph [simple necklace layout, grow'=down, node sep=1em, @@ -49,35 +52,38 @@ in the graph, the edges are not taken into consideration, unless the { x_1 -> x_2 -> x_3 -> x_4 -> x_5 -> "\dots"[draw=none] -> "x_{n-1}" -> x_n -> x_1 - }; + }; \end{codeexample} - + When you give the |componentwise| option, the graph will be decomposed into connected components, which are then laid out individually and packed using the usual component packing mechanisms: - +% \begin{codeexample}[] \tikz \graph [simple necklace layout] { a -- b -- c -- d -- a, 1 -- 2 -- 3 -- 1 -}; +}; \end{codeexample} +% \begin{codeexample}[] \tikz \graph [simple necklace layout, componentwise] { a -- b -- c -- d -- a, 1 -- 2 -- 3 -- 1 -}; +}; \end{codeexample} - + The nodes are placed in such a way that +% \begin{enumerate} -\item The (angular) distance between the centers of consecutive - nodes is at least |node distance|, -\item the distance between the borders of consecutive nodes is at - least |node sep|, and -\item the radius is at least |radius|. + \item The (angular) distance between the centers of consecutive + nodes is at least |node distance|, + \item the distance between the borders of consecutive nodes is at + least |node sep|, and + \item the radius is at least |radius|. \end{enumerate} +% The radius of the circle is chosen near-minimal such that the above properties are satisfied. To be more precise, if all nodes are circles, the radius is chosen optimally while for, say, rectangular @@ -101,8 +107,8 @@ example node sep=0pt, node distance=0pt, nodes={draw,circle}] { 1 -- 2 [minimum size=30pt] -- 3 -- - 4 [minimum size=50pt] -- 5 [minimum size=40pt] -- 6 -- 7 }; - + 4 [minimum size=50pt] -- 5 [minimum size=40pt] -- 6 -- 7 }; + \draw [red] (0,-1.25) circle []; \end{tikzpicture} ]] @@ -113,7 +119,7 @@ example node sep=0pt, node distance=1cm, nodes={draw,circle}] { 1 -- 2 [minimum size=30pt] -- 3 -- - 4 [minimum size=50pt] -- 5 [minimum size=40pt] -- 6 -- 7 }; + 4 [minimum size=50pt] -- 5 [minimum size=40pt] -- 6 -- 7 }; ]] example @@ -122,7 +128,7 @@ example node sep=2pt, node distance=0pt, nodes={draw,circle}] { 1 -- 2 [minimum size=30pt] -- 3 -- - 4 [minimum size=50pt] -- 5 [minimum size=40pt] -- 6 -- 7 }; + 4 [minimum size=50pt] -- 5 [minimum size=40pt] -- 6 -- 7 }; ]] example @@ -131,6 +137,6 @@ example node sep=0pt, node distance=0pt, nodes={rectangle,draw}] { 1 -- 2 [minimum size=30pt] -- 3 -- - 4 [minimum size=50pt] -- 5 [minimum size=40pt] -- 6 -- 7 }; + 4 [minimum size=50pt] -- 5 [minimum size=40pt] -- 6 -- 7 }; ]] -------------------------------------------------------------------- |