绘制双时区表示图

绘制双时区表示图

有人知道如何以专业的方式绘制双时区表示吗?有没有关于如何使用 LaTeX 或其他软件进行绘制的建议?

在此处输入图片描述

提前致谢。

答案1

这是定义两种块样式的尝试,一种是尖角,另一种是圆角。这里使用了varwidth和包中的enumerate环境来提供一些灵活性。varwithenumitem

在此处输入图片描述

代码

\documentclass{article}
\usepackage[margin=1cm]{geometry}
\usepackage[latin1]{inputenc}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows,positioning}
\usepackage{varwidth,enumitem,amsmath}
\setlist[enumerate]{labelindent=2pt,leftmargin=*}

\begin{document}
\begin{tikzpicture}[auto,
block/.style ={rectangle, draw=black, thick, fill=white,align=left,execute at begin node=\footnotesize,outer sep=0pt,},
    blockrc/.style ={rectangle, draw=black, thick, fill=white, rounded corners,align=left,execute at begin node=\footnotesize,outer sep=0pt},
    myarr/.style={->,>=latex'}
]
\node [block] (diag1) {
\begin{varwidth}{3cm}
\baselineskip=2pt
\begin{enumerate}
\item[1.] Attend to stimulus sorce, push the buttom marked with green tape and more and more
\end{enumerate}
\end{varwidth}
        }; 
\node [right =  0.5cm of diag1,blockrc,] (1a) {\begin{varwidth}{2.5cm}
        \baselineskip=2pt
\begin{enumerate}
\item[1a.] Be aware of locations. Green locations
\end{enumerate}
\end{varwidth}};
      \node[block,anchor=north west]  at (diag1.south east)(diag2)
        {\begin{varwidth}{2cm}
        \baselineskip=2pt
\begin{enumerate}
\item[2.] Intertrial internal\\ of \\duration
\end{enumerate}
\end{varwidth}
}; 
\node [right= 0.5cm of diag2, blockrc] (2a) {\begin{varwidth}{2cm}
      \baselineskip=2pt
\begin{enumerate}
\item[2a.] Attend stimulus souce
\end{enumerate}
\end{varwidth}}; 

%--- repeated diagonal entries
      \node[block,anchor=north west]  at (diag2.south east)(diag3)
        {\begin{varwidth}{2cm}
        \baselineskip=2pt
\begin{enumerate}
\item[3.] Stimulus light  appears
$i=1$ (green)
$i=2$ (red)
\end{enumerate}
\end{varwidth}
}; 
\node [right=  0.5cm of diag3, blockrc] (3a) {%
\begin{varwidth}{2cm}
\baselineskip=2pt
\begin{enumerate}
\item[3a.] Attend stimulus souce
\end{enumerate}
\end{varwidth}
}; 

\node [below right=  0.2cm and 0.1cm of  3a, blockrc] (3b) {%
\begin{varwidth}{1.5cm}
\baselineskip=2pt
\begin{enumerate}
\item[3b.] Some text here.
\end{enumerate}
\end{varwidth}
}; 

\node [below right=  0.2cm and 0.1cm of  3b, blockrc] (3c) {%
\begin{varwidth}{1.5cm}
\baselineskip=2pt
\begin{enumerate}
\item[3c.] Some text here
\end{enumerate}
\end{varwidth}
}; 

\node [below right=  0.2cm and 0.1cm of  3c, blockrc] (3d) {%
\begin{varwidth}{1.5cm}
\baselineskip=2pt
\begin{enumerate}
\item[3d.] Some text here.
\end{enumerate}
\end{varwidth}
}; 

\node [below right=  0.2cm and 0.1cm of  3d, blockrc] (3e) {%
\begin{varwidth}{1.5cm}
\baselineskip=2pt
\begin{enumerate}
\item[3e.] Some text here
\end{enumerate}
\end{varwidth}
}; 


% last diagonal entry 
\node[block,anchor=north west]  at ([shift={(7cm,-4.5cm)}]diag3.south east)(diag4)
{\begin{varwidth}{1.5cm}
\baselineskip=2pt
\begin{enumerate}[leftmargin=*]
\item[4.] Push buttom $j$
\end{enumerate}
\end{varwidth}
}; 

% draw lines

\draw[myarr] (diag1.east)--(1a.west);    
\draw[myarr] (diag2.east)--(2a.west);
\draw[myarr] (diag3.east)--(3a.west);        
\draw[dashed,myarr] (diag3.south east)--(diag4.north west);    


\draw[myarr] ([xshift=1cm]1a.south)--([xshift=1cm]1a.south |- 2a.north);    
\draw[myarr] (diag2.east)--(2a.west);
\draw[myarr] (diag3.east)--(3a.west); 
\draw[myarr] (3e.south)--(3e.south |- diag4.north); 
\foreach \t in{a,b,c,d,e}{
\draw[myarr,rounded corners] (1a.east)-|(3\t.north); 
}
\foreach \f/\t in{a/b,b/c,c/d,d/e}{
\draw[myarr,rounded corners] (3\f.east)-|(3\t.north); 
}

\draw[-] (diag1.south east) -- ++ (0,-8.5cm)coordinate(a)
(diag2.south east) -- ++ (0,-8cm)coordinate(b)
(diag4.south west) -- ++ (0,-1cm)coordinate(c);
\draw[<->,>=latex'] (a)--node[midway]{Choice of RT}([yshift=0.5cm]c);
\draw[<->,>=latex'] (b)--node[midway]{Repetitions of task}(c);
\node[block,draw=none] [below right = 0.2cm and -1.7cm of diag4]{
$\left .
\begin{aligned}
&\mathtt{Correct:}\, i=j\\
&\mathtt{Error:}\, i \neq j
\end{aligned}
\right \}\Rightarrow
\mathtt{\%Errors}
$};
\node[block,draw=none] [above=1ex of diag1]{INSTRUCTIONS};
\node[block,draw=none] [below=1ex of diag1]{\small  Hand locations is\\ counterbalanced};
\node[block,draw=none] [above=1ex of 1a]{        Reinforced by \\ practice trials};
\node[block,draw=none] [below=1ex of diag2]{        \small  Varies \\ randomly\\ over 4,6,8};
\end{tikzpicture}
\end{document}

答案2

看看 tikz,例如这些例子:

http://www.texample.net/tikz/examples/consort-flowchart/ http://www.texample.net/tikz/examples/bayes/

编辑:好的,希望这有帮助:

\begin{tikzpicture}
\node[rounded corners=3pt, draw](n1) at (0,0) {Main Node};
\node[rounded corners=3pt, draw](n2) at (2,-1){Node x};
\node[rounded corners=3pt, draw](n3) at (3,-2) {Node y};
\node[rounded corners=3pt, draw](n4) at (4,-3) {Node z};


\draw[rounded corners] (n1) -- (2,0) -- (n2);
\draw[rounded corners] (n1) -- (3,0) -- (n3);
\draw[rounded corners] (n1) -- (4,0) -- (n4);
\end{tikzpicture}

相关内容