帮助重建流程图

帮助重建流程图

有人能帮我重新绘制下面的流程图吗?我已经尽了最大的努力,但我不明白指示用于在节点之间创建两个箭头。

此外,虽然我希望有一个箭头从“在概率上”和“时刻”指向 L^p,但我不需要按照绘制的方式完成它。也许沿着外部弯曲的箭头会更干净,更容易制作。我只是想表明,如果“在概率上”和“时刻”都是真的,那么 L^p 就是真的。

到目前为止我已经包含了我的代码。

在此处输入图片描述

在此处输入图片描述

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric, arrows}

\tikzstyle{startstop} = [rectangle, rounded corners, minimum width=3cm, minimum height=1cm,text centered, draw=black, fill=red!30]    
\tikzstyle{io} = [trapezium, trapezium left angle=70, trapezium right angle=110, minimum width=3cm, minimum height=1cm, text centered, draw=black, fill=blue!30]    
\tikzstyle{process} = [rectangle, minimum width=3cm, minimum height=1cm, text centered, draw=black, fill=orange!30]
\tikzstyle{decision} = [diamond, minimum width=3cm, minimum height=1cm, text centered, draw=black, fill=green!30]    
\tikzstyle{arrow} = [thick,->,>=stealth]

\begin{document}    

\begin{tikzpicture}[node distance=2cm]
\node (start) [startstop] {Cauchy};
\node (in1) [process, right of=start, xshift=3cm, fill=orange!30] {Almost Surely};    
\node (in2) [process, below of=in1,yshift=-2cm, fill=green!30] {In Probability};    
\node (in3) [process, right of=in2,xshift=3cm,fill=blue!30] {In Distribution};    
\node (in4) [process, left of=in2,xshift=-3cm,fill=yellow!30] {$\mathcal L^p$};    
\node (in5) [process, below of=in4, yshift=-2cm,fill=purple!30] {Moments};    
\draw[implies-implies,double equal sign distance] (start) -- (in1);    
\draw [arrow] (in1) -- (in2);    
\draw [arrow] (in4) -- (in5);    
\draw [arrow] (in4) -- (in2);    
\draw [arrow] (in2) -- (in3);    
\draw [arrow] (in3) |- node[anchor=west] {Finite Moments} (in5);    

\end{tikzpicture}   

\end{document}

答案1

使用该positioning库,无需在节点放置选项中添加xshiftyshift,语法也发生了变化 - 而of=不是=of现在

在此处输入图片描述

\documentclass{article} 
\usepackage{tikz} 
\usetikzlibrary{positioning,calc,shapes.geometric, arrows}


\tikzstyle{startstop} = [rectangle, rounded corners, minimum width=3cm, minimum 
 height=1cm,text centered, draw=black, fill=red!30]

\tikzstyle{io} = [trapezium, trapezium left angle=70, trapezium right angle=110, 
 minimum width=3cm, minimum height=1cm, text centered, draw=black, fill=blue!30]

\tikzstyle{process} = [rectangle, minimum width=3cm, minimum height=1cm, text 
 centered, draw=black, fill=orange!30]
\tikzstyle{decision} = [diamond, minimum width=3cm, minimum height=1cm, text centered, 
 draw=black, fill=green!30]

\tikzstyle{arrow} = [thick,->,>=stealth]

\begin{document}
    
    
    \begin{tikzpicture}[node distance=2cm]
        \node (start) [startstop] {Cauchy};
        
        \node (in1) [process, right=3cm of start, fill=orange!30] {Almost Surely};
        
        \node (in2) [process, below=2cm of in1, fill=green!30] {In Probability};
        
        \node (in3) [process, right=3cm of in2,fill=blue!30] {In Distribution};
        
        \node (in4) [process, left=3cm of in2,fill=yellow!30] {$\mathcal L^p$};
        
        \node (in5) [process, below=2cm of in4,fill=purple!30] {Moments};
        
        \draw[<->, >=stealth] (start) -- (in1);
        
        \draw [arrow] (in1) -- (in2);
        
        \draw [arrow] (in4) -- (in5);
        
        \draw [arrow] (in4) -- (in2);
        
        \draw [arrow] (in2) -- (in3);
        
        \draw [arrow] (in3) |- node[anchor=west] {Finite Moments} (in5);
        
        
    \end{tikzpicture}
    
    
    
\end{document}

编辑

在此处输入图片描述

\documentclass{article} 
\usepackage{tikz} 
\usetikzlibrary{positioning,calc,shapes.geometric, arrows,intersections}


\tikzstyle{startstop} = [rectangle, rounded corners, minimum width=3cm, 
 minimum height=1cm,text centered, draw=black, fill=red!30]

\tikzstyle{io} = [trapezium, trapezium left angle=70, trapezium right 
  angle=110, minimum width=3cm, minimum height=1cm, text centered, 
  draw=black, fill=blue!30]

\tikzstyle{process} = [rectangle, minimum width=3cm, minimum height=1cm, text 
  centered, draw=black, fill=orange!30]
\tikzstyle{decision} = [diamond, minimum width=3cm, minimum height=1cm, text 
centered, draw=black, fill=green!30]

\tikzstyle{arrow} = [line width=2pt,->,>=stealth, color=green!50!black]

\begin{document}
    
    
    \begin{tikzpicture}[node distance=2cm]
        \node (start) [startstop] {Cauchy};
        
        \node (in1) [process, right=3cm of start, fill=orange!30] {Almost 
   Surely};
        
        \node (in2) [process, below=2cm of in1, fill=green!30] {In 
    Probability};
        
        \node (in3) [process, right=3cm of in2,fill=blue!30] {In 
     Distribution};
        
        \node (in4) [process, left=3cm of in2,fill=yellow!30] {$\mathcal 
     L^p$};
        
        \node (in5) [process, below=2cm of in4,fill=purple!30] {Moments};
        
        \draw[<->, >=stealth, line width=2pt,color=green!50!black] (start) -- 
    (in1);
        
        \draw [arrow] ($(in1.south)+(-4pt,0pt)$) -- ($(in2.north)+ 
       (-4pt,0pt)$);
        \draw [arrow] ($(in2.north)+(4pt,0pt)$)--node[right, red!50!black]() 
         {some label}($(in1.south)+(4pt,0pt)$);
        
        \draw [arrow] ($(in4.east)+(0pt,4pt)$) --($(in2.west)+(0pt,4pt)$);
        \draw [arrow] ($(in2.west)+(0pt,-4pt)$) --node[below,red!50!black]() 
         {some label}($(in4.east)+(0pt,-4pt)$);
        
        \draw [arrow] ($(in2.east)+(0pt,4pt)$) --($(in3.west)+(0pt,4pt)$);
        \draw [arrow] ($(in3.west)+(0pt,-4pt)$) --node[below,red!50!black]() 
         {some label}($(in2.east)+(0pt,-4pt)$);
        \draw [arrow] (in3) |- node[anchor=west] {\color{red!50!black}Finite 
        Moments} (in5);
        \draw [arrow] (in4) -- (in5);
        \draw[name path=diag, line width=2pt,color=green!50!black](in2.south 
         west)--coordinate[pos=0.65](diag)(in5.north east);
        \draw[arrow](diag)--(in4.south east);
        
        
    \end{tikzpicture}
    
    
    
\end{document}

编辑节点内的新行

align=center您需要在节点的选项(方括号)中添加命令/left/right,然后\\才会启用换行符()--同样,多行标签也遵循相同的程序

\node (start) [startstop,align=center ] {Cauchy\\ Cauchy \\Cauchy\\ Cauchy};

在此处输入图片描述

相关内容