1

Can someone please help me with this figure? I tried to create it but I just make things worse...

I even had issues with my program...

I am new to LaTeX figure drawing

enter image description here

\documentclass[a4paper]{book}
\usepackage{mathtools}
\usepackage{colonequals}
 \usepackage{mathrsfs}
  \usepackage{amssymb}
  \usepackage{amsthm}
  \usepackage{amsmath} 
   \usepackage{natbib}
   \usepackage{bm}
   \usepackage{mathdots}
   \usepackage{graphicx}
   \usepackage{caption}
   \usepackage{rotating, threeparttable, booktabs}
4
  • Thnk you for your response I'm sorry I'm using my phone I coudn't copy my code but I will soon
    – Siham
    Commented Jul 13, 2019 at 15:55
  • 1
    You only need fit, shapes.geometric, and some patience.
    – user121799
    Commented Jul 13, 2019 at 18:35
  • @CarLaTeX I'm sorry I didn't post my code cause I had some serious issues with my latex so I had to format and clean my computer😔 I wil try again to come up with a code. Even though It was a messy code with a lot of erros and it didn't compile. I will try again and sure it will take me time. So, If you or someone could help me I will really appreciated it a lot because it is related to my research thesis and I have a lot of things to do beside learning other things about latex... Thank you so much
    – Siham
    Commented Aug 1, 2019 at 2:15
  • @marmot Can you please help me?
    – Siham
    Commented Aug 1, 2019 at 2:19

1 Answer 1

3

With TikZ:

\documentclass[a4paper]{book}
\usepackage[%
  labelfont=bf,labelsep=period,
  textfont=bf,
  width=\textwidth,
  justification=raggedright,
  singlelinecheck=false  
  ]{caption}

\usepackage{tikz}
\usetikzlibrary{positioning,backgrounds}
\usetikzlibrary{shapes.geometric, arrows.meta}
\tikzset{
    ovalnode/.style={
        ellipse, 
        very thick,
        fill=white,
        minimum height=1.5cm
        },
    rectnode/.style={
        rectangle,
        rounded corners=5mm,
        very thick,
        draw=blue,
        minimum height=1.5cm
        }
    }
\usepackage{caption}
\begin{document}
\begin{figure}
    \centering
    \begin{tikzpicture}[framed]
        % Blocks
        \node[ovalnode, draw=cyan](A){Some text};
        \node[below right=1cm and .5cm of A, ovalnode, draw=blue] (A1) {Some text};
        \node[below right=2cm and .5cm of A, ovalnode, draw=brown, minimum width=3cm] (A2) {Some text};
        \node[anchor=west, rectnode, minimum width=6cm, minimum height=2.5cm, above right=-1cm and 2cm of A] (NB) {};
        \node[inner xsep=3mm, inner ysep=2mm,anchor=west] (N1) at (NB.175) {Some text};
        \node[anchor=north, font=\bfseries, inner ysep=3mm] at (NB.north) {Some text XX};
        \node[rectnode, text width=4.5cm, minimum height=3cm, inner xsep=3mm, fill=white,below right=-1cm and -4cm of NB] (NF) {};
        \node[anchor=south, font=\bfseries, inner ysep=3mm] at (NF.south) {Some text X};
        \node[inner xsep=3mm, text width=4.5cm, anchor=west] (NF1) at (NF.160) {Some text};
        \node[inner xsep=3mm, text width=4.5cm, anchor=west] (NF2) at (NF.185) {Some text};
        % Arrows
        \draw[-Triangle] (A) |- (A1);
        \draw[-Triangle] (A |- A1) |- (A2);
        \draw[-Triangle, dashed] (A1) |- (NB);
        \draw[-Triangle, thick, dotted] (N1) |- (NF1);
        \draw[-Triangle, thick, dotted] (N1 |- NF1) |- (NF2);
        \draw[-Triangle, dashed] (A2) -| (NF.225);
        \draw[-Triangle] (NF.120) |- (N1);
        % Legenda
        \node[below right=1.5cm and -2cm of NF, anchor=north west, inner xsep=2mm] (D3) {Some text};
        \node[left=2cm of D3, inner xsep=2mm] (D2) {Some text};
        \node[left=2cm of D2, inner xsep=2mm] (D1) {Some text};
        \draw[Triangle-] (D1.west) -- +(-1,0);
        \draw[Triangle-, dashed] (D2.west) -- +(-1,0);
        \draw[Triangle-, thick, dotted] (D3.west) -- +(-1,0);
        \draw[Triangle-Triangle, thick, dotted] (NF1.east) -- ++(.3,0) |- (NF2.east);
    \end{tikzpicture}
    \caption{The model XX\label{fig:my_label}}
\end{figure}
\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 .