3

I am new to Latex. Can anyone help me to draw the diagram in the attached picture in TikZ?

I am sorry for not adding a wml package but I tried TikZ package but I am not able to deal with it.

Here is the text inside boxes:

holder receives n messages,
Exclusion test,
Connect them (Suspicious),
They are distinct,
Generate equation,
Eliminate Cliques,
A  group

enter image description here

3
  • 2
    Welcome to TeX.SE! Please provide us with what you've tried. At the very least you should add the texts such that those who are willing to write an answer do not have to punch them in from a screen shot. The tree can be drawn with forest and the blobs with plain TikZ.
    – user121799
    Commented Dec 14, 2018 at 5:14
  • I add the text to the question. Thanks for your clarification to me. Appreciate your help. I can learn from answering this question to how to draw future diagrams like attached. Commented Dec 14, 2018 at 5:27
  • 1
    Maybe, coud you begin by this : texample.net/tikz/examples/tag/flowcharts
    – flav
    Commented Dec 14, 2018 at 5:37

1 Answer 1

3

Here is a proposal. It is certainly not the most elegant option, but perhaps this is the easiest way to learn this kind of stuff.

\documentclass[tikz,border=3.14mm]{standalone}
\usetikzlibrary{positioning,shapes.geometric,shapes.misc}
\begin{document}
\begin{tikzpicture}
 \begin{scope}[every node/.append style={draw},cifi/.style={inner sep=1pt,circle,draw,fill=#1}]
  \node[rounded corners](A){holder receives $n$ messages};
  \node[diamond,below=1cm of A](B){Exclusion test};
  \node[rounded corners,align=center,below right=1cm and 2cm of B] (C) {Connect
  them\\ (Suspicious)};
  \node[rounded corners,below left=1cm and 2cm of B] (C') {They are distinct};
  \node[rounded corners,below=1cm of C] (D) {Generate equation};
  \node[rounded corners,below=1cm of D] (E) {Eliminate Cliques};
  \node[rounded corners,below=1cm of E] (F) {A  group};
  \node[cifi=white,right=3mm of C'] (S1) {$T_1$};
  \node[cross out,line width=1mm,red,right=3mm of S1] (X1) {};
  \node[cifi=white,right=3mm of X1] (S2) {$T_2$};
  \node[cifi=green,below=8mm of X1] (T1) {$T_1$};
  \node[cifi=green,right=4mm of T1,yshift=1mm] (T4) {$T_4$};
  \node[cifi=green,below right=3mm of T4] (T5) {$T_5$};
  \node[cifi=green,below left=3mm and 2mm of T5] (T7) {$T_7$};
  \node[cifi=orange!60,below left=4mm and 6mm of T4] (T3) {$T_3$};
  \node[cifi=orange!60,left=3mm of T3] (T2) {$T_2$};
  \node[cifi=orange!60,below right=3mm and 2mm of T2] (T6) {$T_6$};
  \node[cifi=orange!60,right=3mm of C] (T5') {$T_5$};
  \node[cifi=orange!60,right=3mm of T5'] (T3') {$T_3$};
 \end{scope}
 \begin{scope}[thick,>=latex,font=\small]
  \draw (T1) -- (T4) -- (T3) -- (T2) -- (T6) -- (T3) -- (T7)  (T5') -- (T3');
  \draw[->] (A) edge (B) (C) edge (D) (D) edge (E) (E) edge (F);
  \draw[->](B)  -| node[above,pos=0.2]{Negative}(C) ;
  \draw[->](B) -| node[above,pos=0.2]{Positive} (C');
 \end{scope}
 \draw[dashed] plot[smooth cycle] coordinates {([xshift=-3mm,yshift=1mm]T2.north west)
 ([xshift=2mm,yshift=1mm]T3.north east) ([yshift=-1mm,xshift=1mm]T6.south east)
 ([yshift=-1mm,xshift=-1mm]T6.south west)}; 
 \draw[thick,latex-] ([yshift=-1mm,xshift=-1mm]T6.south west) -- ++ (-1,-0.5) node[left] {a group};
\end{tikzpicture}
\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .