I have a number of 'decision tree' type of charts I am trying to produce dynamically (rather than in Illustrator or OmniGraffle). Each chart contains a few hundred nodes. Because of the number of nodes, it would be particularly useful to be able to use 360 degrees of space surrounding the root node (much like a mindmap or a circular phylogenetic tree).
I don't have strong preferences about where every single node is exactly placed. The dynamic layout possibilities of LaTeX are therefore great (I don't want to place hundreds of nodes by hand). But the layout will make a lot more sense and be more aesthetically appealing if I can, at times, 'nudge' the angle between parent and child nodes.
I have seen there is a way to do what I want in TikZ with grow cyclic
but I can't figure out how to incorporate that into a tree made with Forest (I am new to LaTeX, but my understanding is that Forest is TikZ-based, so my intuition is that this should be possible).
Is there a way to radially layout trees in Forest, or should I be using a different tool?
As a quick (and very simple) example, this code:
\documentclass[tikz,border=5pt]{standalone}
\usepackage{forest}
\usepackage[LGR,T1]{fontenc} % these three lines added
\usepackage[utf8]{inputenc} % so that greek symbols will show
\newcommand{\greek}[1]{\begingroup\fontencoding{LGR}\selectfont#1\endgroup}
% write greek like this --> \greek{α}
\begin{document}
\begin{forest}
for tree={
rectangle,
rounded corners=0.3em,
draw,
minimum width=2.5em,
l sep+=1.5em,
s sep+=1em,
anchor=center,
grow=0,
},
delay={
,
}
[kansas city
[west
[los angeles,
[santa monica]
[west hollywood]
]
[san francisco,
[the castro]
]
]
[south
[texas]
[mexico]
]
[east
[north carolina]
[south carolina]
]
[north
[wisconsin]
[minnesota]
]
]
\end{forest}
\end{document}
But really, to make more sense to a person viewing, the first level nodes (east, west, etc) should be distributed radially around the root node, sort of like this extremely crude mockup ...
...and if any given node has 8+ children, using more than 180 degrees of arc to position those children really would make sense, IMO. For example, see the 'l' node here with 9 children:
I will also note that I am aware of calign
but using it to align child nodes to anywhere over 179 degrees apart will cause a 'divide by zero' error for Package PGF. Anything over 160 degrees looks aesthetically horrible because of small angle issues that cause the node connections to lengthen significantly, but it does work up to 179 degrees. Example code snippet:
\begin{forest}
calign=fixed edge angles,
calign primary angle=-89,calign secondary angle=89,
for tree={
rectangle,
I am okay with switching to TikZ or something else if I need to, it's just that I have sunk costs with Forest and it does otherwise seem to be ideal for my uses. (The only workaround I can think of is to make each chart actually 4 "fractional charts," where each of the four covers one quadrant, and then merge the outputs afterward. But this seems like such poor practice I figured it was time to ask here.)
graph
facilities of TikZ? Is LuaTeX an option?