5

I want to make my diagram’s rectangles look like these, the arrows and rectangles are in bold plus they have a shadow effect:

enter image description here

Right now they look like this:

 \documentclass{article}
\usepackage[edges]{forest}
\begin{document}
\begin{forest}
forked edges,
for tree={draw,align=center,edge={-latex}}
[Recommendation\\ Systems
 [1.1]
 [1.2
  [1.2.1
   [1.2.1.1]
   [1.2.1.2]
  ]
  [1.2.2
   [1.2.2.1]
   [1.2.2.2]
   [1.2.2.3]
  ]
 ]
 [1.3]
]
\end{forest}
\end{document}

enter image description here

5

How about

\documentclass{article}
\usepackage[margin=1in]{geometry}
\usepackage{tikz}
\usetikzlibrary{positioning,arrows.meta,bending,shadows.blur,shapes.multipart,
shapes.geometric,calc}
\tikzset{database/.style={cylinder,aspect=0.3,draw,shape border rotate=90,path picture={
\draw let \p1=($(path picture bounding box.east)-(path picture bounding
box.west)$) in 
foreach \XX in {1,2,3}  {([yshift=-0.15*\x1-\XX*1ex]path picture bounding box.north west) 
arc(180:360:\x1/2 and 0.3*\x1/2)};
}}}
\newsavebox\LoopArrow
\sbox\LoopArrow{\begin{tikzpicture}
 \draw[thick,-{Latex[bend]}] (90:2em) arc(90:455:2em);
\end{tikzpicture}}
\begin{document}
\begin{tikzpicture}[font=\sffamily,
grimsel/.style={rectangle split,rectangle split parts=2,draw,thick,
    fill=white,blur shadow,rounded corners,text width=10em,align=center}]
 \node[grimsel] (datap)  {Data preprocessing\nodepart[align=left]{two}
    \textit{blablabla.py}\\
    xyz\\ 
    abc};
 \node[grimsel,below=3em of datap] (fine)  {Finetuning\nodepart[align=left]{two}
  \textit{blablabla.py}\\
  \makebox[10em][c]{\usebox\LoopArrow}};   
 \node[grimsel,above right=2em and 4em of fine.east] (algo) {Algorithms\nodepart[align=left]{two}
    \textit{blablabla.py}\\
    xyz\\ 
    abc};
 \node[grimsel,below right=2em and 4em of fine.east] (utils) {Utils\nodepart[align=left]{two}
    Evaluation\\ 
    abc\\
    xyz\\ 
    abc};
 \node[left=3em of datap,thick,fill=white,blur shadow,database,shape aspect=0.3,minimum height=8em] (SQL)  {PostGreSQL}; 
 \begin{scope}[very thick,-Latex]
  \draw (SQL) -- (datap);
  \draw (datap) -- (fine);
  \draw (algo.west) -- ++ (-2em,0) |- (fine);
  \draw (utils.west) -- ++ (-2em,0) |- (fine);
 \end{scope}
\end{tikzpicture}
\end{document}

enter image description here

Or a forest version:

\documentclass{article}
\usepackage[edges]{forest}
\usetikzlibrary{shadows.blur,shapes.multipart}
\tikzset{grimsel/.style={rectangle split,rectangle split parts=2,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}}
[{\NodeTitle{Recommendation Systems} bla bla}
 [{\NodeTitle{1.1} bla}]
 [{\NodeTitle{1.2} bla}
  [{\NodeTitle{1.2.1} bla}
   [{\NodeTitle{1.2.1.1} bla}]
   [{\NodeTitle{1.2.1.2} bla}]
  ]
  [{\NodeTitle{1.2.2} bla}
   [{\NodeTitle{1.2.2.1} bla}]
   [{\NodeTitle{1.2.2.2} bla}]
   [{\NodeTitle{1.2.2.3} bla}]
  ]
 ]
 [{1.3\nodepart[align=left]{two} bla}]
]
\end{forest}
\end{document}

enter image description here

  • How can I make the border of the rectangles look bold? Almost like the arrows but not that much. Thank you! – NaveganTeX Jun 16 at 3:35
  • @naveganTeX Just add thick (or line width=...pt) to the definition of grimsel, I added this to the upper code. – marmot Jun 16 at 3:40
  • I just saw it!!! Bla bla bla... chapeau! – NaveganTeX Jun 16 at 3:41

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.