6

I was wondering if there is any chance to plot this in LateX. It either is too challenging or it cannot be done. What tools are available in such case?

Picture

More clear view:

enter image description here

enter image description here

  • 1
    That is beyond challenging!!! 😂 – user189304 Jun 22 at 23:34
  • 2
    Welcome to TeX.SX! The short answer is that, yes, this is possible but I have to warn you that questions of the form "Please draw this for me" that show no effort on the part of OP, often don't get answered. You will get more help if you post some code showing what you have tried and give a minimal working example. A quick search on TeX.SX for drawing functions (with tikz or pstricks) will give you an idea of where to start from. In fact, I don't think that this is so challenging! – Andrew Jun 23 at 0:26
  • I have no idea about how to start. I mean, what MWE am I gonna do if I have no starting point at all? I know about “do it for me” questions, but this is not the case. I’m doing a research on the packages used – NaveganTeX Jun 23 at 0:30
12

This uses fact that a matrix does not get slanted. So one can slant ordinary nodes only. (The arrows can be slanted with \pgflowlevelsynccm.)

\documentclass[tikz,border=3.14mm]{standalone}
\usetikzlibrary{positioning,matrix,fit,backgrounds,arrows.meta}
\newcommand{\grf}[3][]{\phantom{\fbox{#3}}\fbox{#2}\\
  \fbox{#3}\phantom{\fbox{#2}}}
\newsavebox\PftA
\newsavebox\PftB
\newsavebox\PftC
\newsavebox\PftD
\newsavebox\PftE
\sbox\PftA{\tikz[scale=0.6,font=\sffamily,transform shape,nodes={fill=white}]{
\node[align=center,draw](A) {Similarity\\ measures};
\node[align=center,right=0.5ex of A,draw]{Aggreation\\ measures};}}
\sbox\PftB{\tikz[scale=0.6,font=\sffamily,transform shape,nodes={fill=white}]{
\node[align=center,draw](A) {Neural\\ Networks};
\node[align=center,below left=0pt of A,draw]{Bayesian\\ Networks};}}
\sbox\PftC{\tikz[scale=0.6,font=\sffamily,transform shape,nodes={fill=white}]{
\node[align=center,draw,minimum height=0.8cm,minimum width=1.5cm](A) {Fuzzy};
\node[align=center,below left=0pt of A,draw,minimum width=1.5cm]{Genetic\\ Algorithms};}}
\sbox\PftD{\tikz[scale=0.6,font=\sffamily,transform shape,nodes={fill=white}]{
\node[align=center,draw](A) {User to user\\ KNN};
\node[align=center,right=0.5ex of A,draw]{Item to item\\ KNN};}}
\begin{document}
\begin{tikzpicture}[%sbox/.style={draw},
  standard cell/.style={align=center,xslant=2/3,transform shape,draw,text
  width=3cm,anchor=center},
  font=\sffamily,node distance=1em and 1em,
  connect/.style args={#1 with #2}{insert path={
  foreach \Anchor in {north west,north east, south west, south east}
  {(#1.\Anchor) -- (#2.\Anchor)}}}]
 \matrix[matrix of nodes,
 nodes={standard cell},
 column sep=-1em,
 row 2/.style={nodes={text width=2cm,node font=\small}},
 row 3/.style={nodes={densely dotted}},
 row 4/.style={nodes={draw=none}},
 row 5/.style={nodes={draw=none}},
 row 6/.style={nodes={minimum height=1.5cm,fill=white}},
 row 7/.style={nodes={minimum height=1.5cm,fill=white}},
 row 8/.style={nodes={minimum height=1.5cm,fill=white}},
 ](mat) {
  {non public\\ commercial\\ database} & &{public database\\ ducks\\ koalas}  &  
    \\[-11em]
  {content based\\ filtering} & {demographic\\ filtering} &  
    {collaborative\\ filtering} &  \\[-10em]
  {\grf{LSI}{SVD} } &  &{Memory based\\ \usebox\PftA}  &  \\[-6em]
  {\usebox\PftB} & &  &  \\[-6em]
  {\usebox\PftC} & &  &  \\[-8em]
  |[minimum height=1.5cm]| Model based & & {Hybrid u2u / i2i \\ \usebox\PftD 
  }  &  \\[-10em]
     & Predictions &  & {Cross validation\\ MAE RMSE\\ Coverage}  \\[-10em]
     & {{\Large Top N}\\ Recommendation} &  & {Cross validation\\ Precision
     Recall\\ ROC Rank metric}  \\
 };

 \path (-3cm,-12.4cm) rectangle (3cm,1cm);
 \begin{scope}[nodes={align=center,xslant=2/3,transform shape},on background
 layer]
  \node[above=2pt of mat-2-1,xshift=-1em] (HF){Hybrid filtering};
  \node[fit=(mat-2-1)(mat-2-3)(HF),draw,inner xsep=1em] (Fit) {};
  \draw[densely dotted,connect/.list={mat-2-3 with mat-3-3,
  mat-7-2 with mat-8-2,mat-6-1 with mat-7-2,mat-6-3 with mat-7-2,
  mat-3-1 with mat-6-1,mat-3-3 with mat-6-3,Fit with mat-3-1}];
  \draw[line width=4mm] (mat-8-4.center) -- ++(3.5,0) |-
  ([yshift=0.4cm]mat-1-3.north) coordinate(aux1);
  \draw[line width=4mm,-{Triangle[scale=0.5]},shorten >=1mm,shorten <=-1mm] (aux1|-mat-1-3.north) -- 
  (aux1|-mat-2-3.south);
  \draw[line width=4mm,-{Triangle[scale=0.5]},shorten >=1mm,shorten <=-1mm] (mat-1-1.north) coordinate(aux2) -- 
  (aux2|-mat-2-1.south);
  \begin{scope}[xslant=2/3]
   \pgflowlevelsynccm
   \draw[line width=4mm,-{Triangle[scale=0.5]},shorten >=4mm] (mat-8-2) -- (mat-8-4);
   \draw[line width=4mm,-{Triangle[scale=0.5]},shorten >=-8mm] (mat-7-2) -- (mat-7-4);
  \end{scope}
 \end{scope}
 \draw[densely dotted] (mat-7-2.south east) --  (mat-8-2.south east)
 (mat-7-2.south west) -- (mat-6-1.south west)
 (mat-7-2.south east) -- (mat-6-3.south east)
 (mat-6-1.south east)  -- (mat-3-1.south east);
\end{tikzpicture}
\end{document}

enter image description here

  • You’re a piece of work!!! What other texts? Aren’t they visible on the actual picture? – NaveganTeX Jun 23 at 0:53
  • @naveganTeX Yes, but I cannot copy and paste them. – user121799 Jun 23 at 3:06
  • Got it. I will write them down. Btw, I have a new post. If you’re not decoupling now, just stop by :) – NaveganTeX Jun 23 at 3:13
  • I take my hat off to you! Chapeau! Thank you so much!!! – NaveganTeX Jun 23 at 7:40
  • 1
    This is extremely impressive. StackExchange coulde have a 😮 button just for those occasions. – Eric Duminil Jun 23 at 18:01

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.