1

I am having trouble with the height of the arrows, how can I fix it?

enter image description here

\documentclass{article}
\usepackage[edges]{forest}
\usetikzlibrary{shadows.blur,shapes.multipart}
\tikzset{grimsel/.style={rectangle split,rectangle split parts=1,draw,
    fill=white,blur shadow,rounded corners,align=center}}
\begin{document}
\newcommand{\NodeTitle}[2][]{#2\nodepart[align=left,text width={width("#2")}]{two}}
\begin{forest}
forked edges,
for tree={grimsel,edge={-latex}}
[Recommender Systems,l=17mm,
 [ Approach \\ Content Based,l=17mm]
 [Approach \\ Filtrado Colaborativo,l=17mm,
  [{Memory \\Based }
   [{User  \\ Based}]
   [{Item  \\ Based}]   
]
  [{Model\\ Based}
   [{Clustering \\methos}]
   [{Matrix factorization \\ Method}]
   [{Neural \\ Networks}]
  ]
 ]
 [{Hybrid\\approach  \nodepart[align=left]{two} },l=17mm]
]
\end{forest}
\end{document}
  • What precisely do you mean by the height of the arrows? – user121799 Jun 16 at 4:27
  • Like the lenght of the arrows, the separation between rectangles.. As an example, below Recommendation Systems, the arrow's length is not large enough. A good length is like for the arrows that are pointing towards the three rectangles corresponding to the second line – NaveganTeX Jun 16 at 4:42
2

With some help from here.

\documentclass{article}
\usepackage[edges]{forest}
\usetikzlibrary{shadows.blur,shapes.multipart}
\tikzset{grimsel/.style={rectangle split,rectangle split parts=1,draw,
    fill=white,blur shadow,rounded corners,align=center}}
\begin{document}
\newcommand{\NodeTitle}[2][]{#2\nodepart[align=left,text width={width("#2")}]{two}}
\begin{forest}
forked edges,
for tree={grimsel,thick,edge={-latex,very thick},l sep = 12mm,fork sep=6mm}
[Recommender Systems,
 [ Approach \\ Content Based]
 [Approach \\ Filtrado Colaborativo,calign with current 
  [{Memory \\Based }
   [{User  \\ Based}]
   [{Item  \\ Based}]   
]
  [{Model\\ Based}
   [{Clustering \\methos}]
   [{Matrix factorization \\ Method},calign with current]
   [{Neural \\ Networks}]
  ]
 ]
 [{Hybrid\\approach  \nodepart[align=left]{two} }]
]
\end{forest}
\end{document}

enter image description here

  • Yes!!! That's exactly what I was looking for!!! Thank you Marmot – NaveganTeX Jun 16 at 4:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.