创建相同的图形

创建相同的图形

有人能帮我画出这个图吗?我试着画出来但结果却更糟了...

我的程序甚至也出现了问题……

我是 LaTeX 图形绘制的新手

在此处输入图片描述

\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}

答案1

使用 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}

在此处输入图片描述

相关内容