绘制示意图

绘制示意图

我想画下面的图片我们的实验示意图

有人能帮我画吗?

我写了这段代码,但无法完成

\begin{document}
 \begin{figure}[h!]
  \begin{center}
    \begin{tikzpicture}
      \path [blue,fill] (0,0)  circle [radius=0.05] node [black,below] {0};
      \draw [blue,fill] (0.5,0) circle [radius=0.05] node [black,below] {1};
      \draw [blue,fill] (1,0) circle [radius=0.05] node [black,below] {2};
      \draw [blue,fill] (1.5,0) circle [radius=0.05] node [black,below] {3};
      \draw [blue,fill] (2,0) circle [radius=0.05] node [black,below] {4};
      \draw [blue,fill] (2.5,0) circle [radius=0.05] node [black,below] {5};
      \draw [blue,fill] (3,0) circle [radius=0.05] node [black,below] {6};
      \draw [blue,fill] (3.5,0) circle [radius=0.05] node [black,below] {7};
      \draw [blue,fill] (4,0) circle [radius=0.05] node [black,below] {8};
      \draw [blue,fill] (4.5,0) circle [radius=0.05] node [black,below] {9};
      \draw [blue,fill] (5,0) circle [radius=0.05] node [black,below] {10};
      \draw [blue,fill] (5.5,0) circle [radius=0.05] node [black,below] {11};
      \draw [blue,fill] (6,0) circle [radius=0.05] node [black,below] {12};
      \draw [blue,fill] (6.5,0) circle [radius=0.05] node [black,below] {13};
      \draw [blue,fill] (7,0) circle [radius=0.05] node [black,below] {14};
      \draw [blue,fill] (7.5,0) circle [radius=0.05] node [black,below] {15};
      \draw [blue,fill] (8,0) circle [radius=0.05] node [black,below] {16};
      \draw [blue,fill] (8.5,0) circle [radius=0.05] node [black,below] {17};
      \draw [blue,fill] (9,0) circle [radius=0.05] node [black,below] {18};
      \draw [blue,fill] (9.5,0) circle [radius=0.05] node [black,below] {19};
      \draw [blue,fill] (10,0) circle [radius=0.05] node [black,below] {20};
      \draw [blue,fill] (10.5,0) circle [radius=0.05] node [black,below] {21};
           \draw [thick] (0,0) to (10.5,0);
    \end{tikzpicture}
    \caption{schematic diagram}
  \end{center}
\end{figure}
\end{document}

答案1

为了好玩...还有一个建议:

\documentclass[tikz, margin=3mm]{standalone}
\usetikzlibrary{arrows.meta,%
                backgrounds,
                decorations.pathreplacing,
                calligraphy,% had to be after decorations.pathreplacing
                positioning,
                quotes
                }

\begin{document}
   \begin{tikzpicture}[
arr/.style = {line width=2mm, -{Triangle[length=3mm, width=4mm]}},
 BC/.style = {pen colour={red}, decorate,
              decoration={calligraphic brace, amplitude=6pt,
                          raise=#1},
              thick},
  inj/.pic = {\draw (0,0) -- ++ (0,2mm) 
                node[minimum size=2mm, fill=red!60,above] {}
                node[draw, semithick, minimum width=2mm, minimum height=5mm,above] (aux) {};
              \draw[thick] (aux.west) -- (aux.east); 
              \draw[thick,{Bar[width=2mm]}-{Hooks[width=4mm]}] (aux.center) -- ++ (0,4mm) coordinate (-inj);
              },
lbl/.style = {font=\footnotesize\bfseries, text=#1, align=center},
lbl/.default = blue!80
                    ]
\foreach \i [count=\j] in {0,1,2,3,4,9,10,...,30}
{
\ifnum\i=4
    \path (0.6*\j,-0.8ex)  node (n\i) [black,below] {\dots};
\else   \ifnum\i<18
    \draw [blue,fill] (0.6*\j,0)  circle [radius=2pt] node[black, below=1pt] (n\i) {\i};
        \else
    \draw [red,fill]  (0.6*\j,0)  circle [radius=2pt] node[black, below=1pt] (n\i) {\i};
        \fi
\fi
}
\node [lbl=black,right] at (n30.east) {Day};
% above
\pic (p1) [above=2mm] at (n0.north) {inj};
    \node[above,lbl=black] at (p1-inj) {MOG\,+\,CFA\,+\\1st PTX};
\pic (p2) [above=2mm] at (n3.north) {inj};
    \node[above,lbl=black] at (p2-inj) {2nd PTX};
\draw[BC=4pt]  (n18.north west) -- node (IP) [lbl,above=16mm] {Daily Melatonin therapy (IP)\\
                                                     \textcolor{black}{8:00 to 9:00 AM}} 
                                                     (n30.north east);
\pic (p3) [above=5mm] at (n24.north) {inj};
% below
\draw[BC=0pt]   (n3.south east)  -- node[lbl,below=8pt] {Immunization} (n0.south west);
\draw[arr]  (n11.south) -- ++ (0,-0.6) node[lbl, below] {Initiation\\ of paralysis};
\draw[arr]  (n30.south) -- ++ (0,-0.6) node[lbl, below] {Sacrifice};
    \end{tikzpicture}
\end{document}

在此处输入图片描述

答案2

这里有一个解决方案,可以让您继续。注射器的图表非常简化。

\documentclass[a4paper]{article}
\usepackage{geometry,graphicx}
\usepackage{tikz}

\usetikzlibrary{calc, positioning,arrows.meta,decorations.pathreplacing}

\begin{document}



\begin{tikzpicture}
\def\lastday{30}

\newcommand{\seringue}[2][0]{

\begin{scope}[rotate=#1]
\draw [thick] ($(#2)+(0,0.1)$) -- ++(0,0.5)coordinate(s0);
\draw ($(s0)+(-0.2,0)$)coordinate(aa) rectangle ++(0.4,1) coordinate(bb);

\draw [double,red,thick] ($(s0)+(0,0.5)$) coordinate(cc)--++ (0,1)coordinate(dd);
\draw [double,red,thick] (cc-|aa) -- (cc-|bb);
\draw [double,red,thick] (dd-|aa) -- (dd-|bb);
\end{scope}
}

\foreach \nn in{0,1,2,...,\lastday}
{
\draw[thick] ({0.5*\nn},0)coordinate(J-\nn) --++ (0,-0.3)node[below](T-\nn){\nn};

}

\draw[thick,black] (J-0) -- (J-30);
\draw[red,line width=2mm] ($(J-17)+(0,1.1mm)$) -- ($(J-30)+(0,1mm)$);

\draw[-{Triangle[width=18pt,length=8pt]}, line width=10pt](T-11) -- ++(0,-1cm)node[below,text width=6em,align=center]{Initiation of ....};

\draw [decorate,decoration={brace,mirror,amplitude=10pt}]
    (T-0.south west) -- (T-3.south east) node [midway,yshift=-0.25in,green!50!black] {Immunization};

\seringue{J-0}
\seringue{J-3}
\seringue[-20]{J-23}

\end{tikzpicture}


\end{document}

在此处输入图片描述

相关内容