I used the following code from this link
The origianl \documentclass was {standalone}. When I used {article}, part of the graph was not displayed. To resize it, I tried putting it inside a {minipage} but I could not figure out how to resize it.
\documentclass{article}
\usepackage {tikz}
\usepackage{forest}
\usetikzlibrary{shadows}
\begin{document}
\forestset{
dir switch tree 2/.style={
for tree={
if level=1{
edge path={
\noexpand\path [\forestoption{edge}] (!u.parent anchor) -- ++(0,-1.5em) -| (.child anchor)\forestoption{edge label};
},
for descendants={
child anchor=west,
align=left,
edge path={
\noexpand\path [\forestoption{edge}] (!u.parent anchor) -- ++(-.5em,0) |- (.child anchor)\forestoption{edge label};
},
before computing xy={
l=.5em
}
},
before computing xy={
l=3em
},
for tree={
parent anchor=west,
anchor=mid west,
grow'=0,
font=\sffamily,
if n children=0{}{
delay={
prepend={[,phantom, calign with current]}
}
},
},
}{},
},
},
}
\tikzset{
colour me/.style={
draw=colour#1,
fill=colour#1!20!white,
text=colour#1!25!black,
}
}
\colorlet{colour0}{blue}
\colorlet{colour1}{green}
\colorlet{colour2}{red}
\colorlet{colour3}{orange}
\colorlet{colour4}{yellow}
\colorlet{colour5}{magenta}
\begin{minipage}{\textwidth}
{
\begin{forest}
dir switch tree 2,
for tree={
if level=0{
colour me=0
}{
if level=1{
node options/.wrap pgfmath arg={colour me=#1}{n()}
}{
node options/.wrap 2 pgfmath args={colour me=#1!#2!black}{n("!u")}{100*(n_children("!u")-n()/2)/(n_children("!u"))}
}
},
rounded corners,
thick,
drop shadow,
edge={thick}
}
[Super Long Title With No Meaning
[Criteria 1
[Attribute\\Number 1]
[Attribute 2]
[Attribute 3]
[Attribute 4]
[Another\\Attribute]
]
[Criteria 2
[Attribute 1]
[Attribute 2]
[Third\\Criteria]
[Longtext-\\criteria]
]
[Criteria 3
[Attribute\\two lines]
[Attribute 2]
[Attribute 3]
]
[Criteria 4
[Attribute 1]
[Attribute 2]
]
[Criteria 5
[First\\Attribute]
[Attribute 2]
[Third\\Criteria]
[Longtext-\\criteria]
]
]
\end{forest}
}
\end{minipage}
\end{document}



edge path'rather thanedge pathand so on as it is less faff. Do you mean you want to add a further branch horizontally e.g. 'criterion 6'? It is possible to make it fit in various ways. If you don't want to rotate it (which would be the obvious suggestion), you could make it smaller. What I would probably try first would be to move one of the branches below the others e.g. so criterion 6 was below 'another attribute', but with the edge still coming from the 'super long title ...'. However, turning it might be easier for readers. – cfr Dec 16 '19 at 06:05sidewaysfigurefrom therotatingpackage. That way, your page still has its ordinary orientation (headers, footers etc.) and only the tree gets turned. But it is hard to know without more detail about what you're doing. – cfr Dec 16 '19 at 06:06