JackieLin0123/SciTikZ-Bench huggingface dataset:
\documentclass[tikz]{standalone}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}
  \node (s) {Source}; \node (t) [right=of s] {Target};
  \draw [thick, ->] (s) -- (t);
\end{tikzpicture}
\end{document}
\documentclass[border=5pt]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
    \newcommand*{\width}{2}
    \newcommand*{\height}{0.5*\width}
    \draw[fill=gray!40] (0,0) ellipse ({\width} and {\height});
    \node at (0,0) {$Y$};
\end{tikzpicture}
\end{document}
\documentclass[border=5pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{calc, arrows}

\begin{document}
\begin{tikzpicture}[->,>=stealth',every node/.style={circle,draw},level 1/.style={sibling distance=50mm},level 2/.style={sibling distance=20mm},level 3/.style={sibling distance=12mm}]
\node (nA){A}
   child { node (nB) {B}
              child { node (nD) {D}
                         child { node (nH) {H} }
                       }
              child {  node (nE) {E}
                         child { node (nI) {I} }
                         child { node (nJ) {J} }
                       }
            }
   child { node (nC) {C}
              child { node (nF) {F}
                         child { node (nK) {K}  }
                         child { node (nL) {L} }
                         child { node (nM) {M} }
                       }
              child {  node (nG) {G} }
             };

  \draw[->,blue,rounded corners,dashed,line width=0.7pt]
    ($(nA) + (-0.4,0.2)$) --
    ($(nB) +(-0.3,0.4)$) --
    ($(nB) +(-0.6,0.0)$) --
    ($(nD)  +(-0.4,0.3)$) --
    ($(nD)  +(-0.5,0.0)$) --
    ($(nH)  +(-0.5,0.0)$) --
    ($(nH)  +(-0.4,-0.35)$) --
    ($(nH)  +(0.0,-0.5)$) --
    ($(nH)  +(0.4,-0.35)$) --
    ($(nH)  +(0.5,0.0)$) --
    ($(nD)  +(0.45,0.0)$) --
    ($(nB)  +(0.0,-0.4)$) --
    ($(nE)  +(-0.45,0.0)$) --
    ($(nI)  +(-0.45,0.0)$) --
    ($(nI)  +(-0.35,-0.35)$) --
    ($(nI)  +(0.0,-0.45)$) --
    ($(nI)  +(0.35,-0.35)$) --
    ($(nI)  +(0.4,0.0)$) --
    ($(nE)  +(0.0,-0.4)$) --
    ($(nJ)  +(-0.45,0.0)$) --
    ($(nJ)  +(-0.35,-0.35)$) --
    ($(nJ)  +(0.0,-0.45)$) --
    ($(nJ)  +(0.35,-0.35)$) --
    ($(nJ)  +(0.45,0.0)$) --
    ($(nE)  +(0.4,0.2)$) --
    ($(nB)  +(0.4,0.0)$) --
    ($(nA)  +(0.0,-0.4)$) --
    ($(nC)  +(-0.4,0.0)$) --
    ($(nK)  +(-0.5,0.1)$) --
    ($(nK)  +(-0.4,-0.35)$) --
    ($(nK)  +(0.0,-0.5)$) --
    ($(nK)  +(0.4,-0.3)$) --
    ($(nF)  +(-0.15,-0.4)$) --
    ($(nL)  +(-0.5,0.0)$) --
    ($(nL)  +(-0.4,-0.35)$) --
    ($(nL)  +(0.0,-0.5)$) --
    ($(nL)  +(0.4,-0.35)$) --
    ($(nL)  +(0.5,0.0)$) --
    ($(nF)  +(0.15,-0.4)$) --
    ($(nM)  +(-0.5,0.0)$) --
    ($(nM)  +(-0.4,-0.35)$) --
    ($(nM)  +(0.0,-0.5)$) --
    ($(nM)  +(0.4,-0.35)$) --
    ($(nM)  +(0.5,0.2)$) --
    ($(nF)  +(0.4,0.0)$) --
    ($(nC)  +(0.0,-0.4)$) --
    ($(nG)  +(-0.5,0.0)$) --
    ($(nG)  +(-0.4,-0.35)$) --
    ($(nG)  +(0.0,-0.5)$) --
    ($(nG)  +(0.4,-0.35)$) --
    ($(nG)  +(0.5,0.1)$) --
    ($(nC) +(0.6,0.0)$) --
    ($(nC) +(0.3,0.4)$) --
    ($(nA) + (0.4,0.2)$);
\end{tikzpicture}
\end{document}
\documentclass[border=5pt]{standalone}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,bending,shapes.geometric,positioning}

\begin{document}

\begin{tikzpicture}[
  arr/.style={->,thick},
  >=stealth,
  mynode/.style={
    fill=orange,
    ellipse,
    draw,
    text width=0.75cm,
    minimum height=1cm,
    align=center
  }
]

\node[mynode] (e1) {$y_1$}; 
\node[mynode,right=of e1] (e2) {$y_2$}; 
\node[mynode,right=of e2] (e3) {$y_3$}; 

\draw[arr] 
  (e1) to [bend left=-50] node [above=-0.75cm] {$\times(1+t_1)$} (e2);
\draw[arr] 
  (e2) to [bend left=-50] node [above=-0.75cm] {$\times(1+t_2)$} (e3);
\draw[arr] 
  (e1) to [bend left=-90] node [above=-0.75cm] {$\times(1+T)$}  (e3);

\begin{scope}[xshift=8cm]
\node[mynode] (e1) {$y_1$}; 
\node[mynode,right=of e1] (e2) {$y_2$}; 
\node[mynode,right=of e2] (e3) {$y_3$}; 

\draw[arr] 
  (e1.south) to [bend left=-50] node [above=-0.6cm] {$\times(1+t_1)$} (e2.south);
\draw[arr] 
  (e2.south) to [bend left=-50] node [above=-0.6cm] {$\times(1+t_2)$} (e3.south);
\draw[arr] 
  (e1.south) to [bend left=-90] node [above=-0.75cm] {$\times(1+T)$}  (e3.south);
\end{scope}

\begin{scope}[yshift=-4cm]
\node[mynode] (e1) {$y_1$}; 
\node[mynode,right=of e1] (e2) {$y_2$}; 
\node[mynode,right=of e2] (e3) {$y_3$}; 

\draw[arr] 
  (e1.340) to [bend left=-50] node [above=-0.6cm] {$\times(1+t_1)$} (e2.200);
\draw[arr] 
  (e2.340) to [bend left=-50] node [above=-0.6cm] {$\times(1+t_2)$} (e3.200);
\draw[arr] 
  (e1.220) to [bend left=-90] node [above=-0.75cm] {$\times(1+T)$}  (e3.320);
\end{scope}
\end{tikzpicture}

\end{document}
\documentclass[border=5pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{matrix}
\begin{document}
\begin{tikzpicture}[cell/.style={rectangle}, nodes in empty cells]
  \matrix[
  draw,
  matrix of math nodes,
  row sep =-\pgflinewidth,
  column sep = -\pgflinewidth,
  nodes={anchor=center, minimum width=2cm, cell},
  column 1/.style = {nodes={minimum width=2cm}},
  row 1/.style = {nodes={text height=1.3ex, text depth=0}},
  row 2/.style = {text height=1.3ex, text depth=0},
  row 3/.style = {text height=1.3ex, text depth=0},
  row 4/.style = {text height=1.3ex, text depth=0},
  row 5/.style = {text height=1.3ex, text depth=0},  
  row 6/.style = {text height=1.3ex, text depth=0},
  ] (m)
  { \\
    \\
    \\
    i \mapsto 5 \\
    \\
    \\
  };
\end{tikzpicture}

\begin{tikzpicture}[cell/.style={rectangle}, nodes in empty cells]
  \node[
  draw,
  text width=2cm,minimum height=3cm,align=center] (m)
  {$i \mapsto 5$};
\end{tikzpicture}
\end{document}
\documentclass[tikz,border=20pt]{standalone}
\usetikzlibrary{positioning}

\begin{document}
\begin{tikzpicture}
  [every node/.style={draw}]
  \node (A) {A};
  \node [below right=1 and 2 of A] (B) {B};
  \filldraw (A.east) +(0,3.5pt) -- ([yshift=3.5pt]B.west) -- +(0,-7pt) -- ([yshift=-3.5pt]A.east) -- cycle;
\end{tikzpicture}
\end{document}
\documentclass[tikz,border=10pt]{standalone}
\usetikzlibrary{arrows.meta,positioning,calc}

\begin{document}

\newcounter{rom}
\setcounter{rom}{0}
\tikzset{%
  rom/.style = {draw, text width=5em, text centered, minimum height=4em, font=\sffamily},
  a node/.style = {inner sep=1pt, font=\scriptsize},
  rom node/.pic = {%
    \stepcounter{rom}%
    \node [rom] (rom\therom) {ROM};
    \foreach \i [count=\j from 0] in {1/4,1/2,3/4} \node (rom\therom-a\j) [a node, right] at ($(rom\therom.south west)!\i!(rom\therom.north west)$) {$A_\j$};
    \node (rom\therom-d1) [a node, left] at (rom\therom-a2 -| rom\therom.east) {$D_1$};
    \node (rom\therom-d0) [a node, left] at (rom\therom-a0 -| rom\therom.east) {$D_0$};
    \node [a node, below] at (rom\therom.north) {$8 \times 2$};
    \node (rom\therom-ce) [a node, above, xshift=-10pt] at (rom\therom.south) {$CE$};
    \node (rom\therom-oe) [a node, above, xshift=10pt] at (rom\therom.south) {$OE$};
  },
  bullet arrow/.style={{Circle[width=2pt,length=2pt]}->, shorten <=-1pt}
}

\begin{tikzpicture}[>={Latex[]}]
  \pic {rom node};
  \pic [below=of rom1] {rom node};
  \foreach \i/\j in {rom1-d1/3,rom1-d0/2,rom2-d1/1,rom2-d0/0}
    \draw [->] (\i) -- +(20mm,0) node (d\j) [a node, right] {$D_\j$};
  \foreach \i in {0,1,2} {
    \draw [<-] (rom1-a\i) -- +(-20mm,0) coordinate [pos=(3-\i)/6] (a\i x) node (a\i) [a node, left] {$A_\i$};
    \draw [bullet arrow] (a\i x) |- (rom2-a\i);
  }
  \draw [<-] (rom2-oe) |- +(20mm,-5mm) coordinate [pos=.85] (oex) coordinate (oe);
  \draw [<-] (rom2-ce) |- ([yshift=-2.5mm]oe) coordinate [pos=.8] (cex);
  \draw [bullet arrow] (oex) |- ([yshift=-5mm]rom1-oe.south) -- (rom1-oe.south);
  \draw [bullet arrow] (cex) |- ([yshift=-7.5mm]rom1-ce.south) -- (rom1-ce.south);
\end{tikzpicture}

\end{document}
\documentclass[tikz,border=10pt]{standalone}
\usetikzlibrary{arrows.meta}
\begin{document}
\begin{tikzpicture}[line cap=round, line join=round, >=Triangle, x=12.0926cm, y=374.6607cm]
  \draw[->] (0,0) -- (0.85,0);
  \foreach \x in {0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8}
    \draw[shift={(\x,0)}] (0pt,2pt) -- (0pt,-2pt) node[below] {\footnotesize $\x$};
\end{tikzpicture}
\end{document}
\documentclass{standalone}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\newcommand{\umlinterface}[1]{<<interface>> \\ \textbf{#1}}
\tikzset{
  /uml/interface/.style={
    rectangle, draw,
    execute at begin node=\umlinterface\bgroup,
    execute at end node=\egroup
  }
}
\begin{document}
\begin{tikzpicture}
  \node[/uml/interface] (MyInterface) {MyInterface};
\end{tikzpicture}
\end{document}
\documentclass[tikz]{standalone}
\usetikzlibrary{calc}
\usetikzlibrary{mindmap}

\begin{document}
\begin{tikzpicture}[mindmap,concept color=red!50]
\node [concept] (root) {Root concept} child[clockwise from=30] {node[concept] (child) {Child concept}};
\path (root) -- node[annotation,fill=black!40,above,align=center,text width=0.5cm,sloped] {text} (child);
\end{tikzpicture}
\end{document}
\documentclass[border=5pt]{standalone}
\usepackage{tikz}
\usepackage{ifthen}
\usepackage{fp}

\makeatletter
\def\traceTangente(#1,#2,#3,#4){%
\ifthenelse{\lengthtest{#4pt>0pt}}{%
\FPeval\DemiTangenteV{(#3)*(#4)}%
\FPeval\TangentXa{(#1)-(#4)}%
\FPeval\TangentXb{(#1)+(#4)}%
\FPeval\TangentYa{(#2)-(\DemiTangenteV)}%
\FPround\TangentYa\TangentYa{3}%
\FPeval\TangentYb{(#2)+(\DemiTangenteV)}%
\FPround\TangentYb\TangentYb{3}%
\draw [<->,color=orange!50!red] (\TangentXa,\TangentYa) -- (\TangentXb,\TangentYb);}{}}

\def\Interpolation(#1,#2,#3)(#4,#5,#6){%
\draw[domain=#1:#4,smooth,variable=\x,color=cyan!50!blue,line width=1.2pt]%
  plot (\x,{(\x+(-1)*(#4))^2*((1+(-2)*(\x+(-1)*(#1))*(#1+(-1)*%
(#4))/((#1+(-1)*(#4))^2))*#2+(\x+(-1)*(#1))*#3)/((#1+(-1)*(#4))^2)+(\x+%
(-1)*(#1))^2*((1+(-2)*(\x+(-1)*(#4))*(#4+(-1)*(#1))/((#1+(-1)*(#4))^2))%
*#5+(\x+(-1)*(#4))*#6)/((#1+(-1)*(#4))^2)});}

\def\HermiteDDL(#1,#2,#3,#4){%
\def\Hermite@xa{#1}\def\Hermite@ya{#2}\def\Hermite@za{#3}%
\traceTangente(#1,#2,#3,#4)%
\fill (#1,#2) circle[radius=1pt];%
\Hermite@next}

\def\Hermite@next{\@ifnextchar ({\Hermite@job}{\Hermite@end}}

\def\Hermite@job(#1,#2,#3,#4){%
\fill (#1,#2) circle[radius=1pt];  
\Interpolation(\Hermite@xa,\Hermite@ya,\Hermite@za)(#1,#2,#3)%
\def\Hermite@xa{#1}\def\Hermite@ya{#2}\def\Hermite@za{#3}%
\traceTangente(#1,#2,#3,#4)\Hermite@next}
\def\Hermite@end{}
\makeatother

\begin{document}
\begin{tikzpicture}
\draw[help lines, color=gray!30, dashed] (-6.2,-5.1) grid (10.1,4.5);
\draw [-stealth] (-6,0) -- (10,0);
\draw [-stealth] (0,-5.3) -- (0,4.5);
\foreach \x in {-6,...,-1,1,2,...,9}
\draw (\x,2pt) -- (\x,-2pt) node[below]{$\x$};
\foreach \y in {-5,...,-1,1,2,3,4}
\draw (2pt,\y) -- (-2pt,\y) node[left]{$\y$};
\HermiteDDL(-5,1,1,1)(-3,2,-2,1)(-1,-2,3,1)(0,2,1,1)(2,1,0,1)(4,0,0.666,3)(6,-2,-2,1)(9,2,0.5,1)(10,-1,-4,0)
\end{tikzpicture}
\end{document}
\documentclass[border=2pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{trees,overlay-beamer-styles}
\usepackage{beamerarticle} % Add this to define \onslide

\begin{document}
\begin{tikzpicture}[
  level 1/.style={every child/.style={edge from parent/.style={->,solid,draw=blue,draw on=<{3-}>}} },
  level 2/.style={sibling distance=12mm,every child/.style={edge from parent/.style={->,solid,draw=blue,draw on=<{2-}>}}},
  level 3/.style={sibling distance=8mm,every child/.style={edge from parent/.style={->,solid,draw=blue}}},
  semithick
]
\node[draw=none] (root) {{\onslide<3->{A}}}
  child {node[draw=none] {{\onslide<2->{B}}}
    child {node[draw=none] {C}}
  };
\end{tikzpicture}
\end{document}
\documentclass[tikz,border=12pt]{standalone}
\usepackage{tikz,pgfplots}

\begin{document}
\begin{tikzpicture}
    \begin{axis}[
        hide axis, scale only axis, height=0pt, width=0pt,
        colormap/jet,
        colorbar sampled,
        colorbar horizontal,
        point meta min = 20,
        point meta max = 40,
        colorbar style = {
            samples = 10,
            height = 0.5cm,
            width = 10cm,
            xtick style={draw=none},
            xticklabel style = {
                text width = 2.5em,
                align = center,
                /pgf/number format/.cd,
                    fixed,
                    fixed zerofill,
                    precision = 1,
                /tikz/.cd
            }
        }
    ]
    \addplot [draw=none] coordinates {(0,0)};
    \end{axis}
    \def\len{5mm}
    \definecolor{leftcolor}{RGB}{191, 191, 191}
    \definecolor{rightcolor}{RGB}{102, 102, 102}
    \foreach \i/\j in {south east/a,east/b,north east/c,north west/e,west/f,south west/g}
    {\coordinate (\j) at (current colorbar axis.\i);}
    \filldraw[fill=leftcolor] (a) -- ([xshift=\len]b) -- (c);
    \filldraw[fill=rightcolor] (e) -- ([xshift=-\len]f) -- (g);
\end{tikzpicture}
\end{document}
\documentclass{standalone}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{shapes.callouts}

\newcommand{\norm}[1]{\left\lVert#1\right\rVert}

\begin{document}
\begin{tikzpicture}
\node (eq1) at (0,0) {$\norm{a-b} \leq \norm{a} + \norm{b}$};
\node (eq2) at (0,-1) {$\norm{\lambda x} = \lambda \norm{x}$};
\end{tikzpicture}
\end{document}
\documentclass[border=5pt]{standalone}
\usepackage{pgfplots}
\usepgfplotslibrary{patchplots}
\pgfplotsset{compat=1.14}

\begin{document}
\begin{tikzpicture}
    \begin{axis}
        \addplot3[patch, patch type=triangle] coordinates { (0,0,0) (1,1,0.1) (0,1,0.2) };
    \end{axis}
\end{tikzpicture}
\end{document}
\documentclass[border=2mm]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\begin{document}
\begin{tikzpicture}
  \begin{axis}[
    grid=both,
    minor tick num=4,
    grid style={line width=.1pt, draw=gray!10},
    major grid style={line width=.2pt,draw=gray!50},
    axis lines=middle,
    enlargelimits={abs=0.2}
  ]
    \addplot[domain=-1:3,samples=50,smooth,red] {cos(deg(pi*x))};
  \end{axis}
\end{tikzpicture}
\end{document}
\documentclass[border=2mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning,arrows.meta}

\tikzset{
  block/.style = {draw, fill=blue!20, rectangle, minimum height=3em, minimum width=6em},
  sum/.style = {draw, fill=blue!20, circle, minimum size=1cm},
  input/.style = {coordinate},
  output/.style = {coordinate},
  pinstyle/.style = {pin edge={to-,thin,black}}
}

\begin{document}
\begin{tikzpicture}[auto, node distance=1cm and 2cm, >=Latex]
  \node [input, name=input] {};
  \node [sum, right=of input] (sum) {};
  \node [block, right=of sum] (controller) {Controller};
  \node [block, right=of controller, pin={[pinstyle]above:Disturbances}, node distance=3cm] (system) {System};
  \draw [->] (controller) -- node[name=u] {$u$} (system);
  \node [output, right=of system] (output) {};
  \node [block, below=of system] (measurements) {Measurements};
  \node [block, below=of controller] (sensor) {Sensor};
  \draw [<-] (measurements) -- node[name=k] {$k$} (sensor);
  \draw [->] (input) -- node {$r$} (sum);
  \draw [->] (sum) -- node {$e$} (controller);
  \draw [->] (system) -- node [name=y] {$y$} (output);
  \draw [->] (y) |- (measurements);
  \draw [->] (sensor) -| node[pos=0.99] {$-$} node [near end] {$y_m$} (sum);
\end{tikzpicture}
\end{document}
\documentclass[border=5pt]{standalone}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}[yscale=3]
% axes
\draw[->] (-0.25,0) -- (7.5,0) node[right] {$x$};
\draw[->] (0,-0.125) -- (0,2) node[above] {$y$};
\foreach \i in {2, 4, 6}
    \node[below] at (\i,0) {$\i$};
% filled area
\fill[domain=2:4,smooth,blue!30] plot (\x,1/\x) -| (2,0.5);
\fill[domain=4:6,smooth,blue!30] plot (\x,1/\x) -| (4,0.25);
% curve 1/x
\draw[domain=0.5:6.5,smooth,variable=\x,black,thick] 
            plot ({\x},{1/\x}) node[right] {$y=1/x$};
% auxiliary lines
\draw[thin] (2,0) -- (2,0.5) node[above] {A}
            (4,0) -- (4,0.25) node[above] {B}
            (6,0) -- (6,1/6) node[above] {H}
            (2,0.25) node[left] {C} -- (4,0.25)
            (4,1/6) node[left] {D} -- (6,1/6) ;
\end{tikzpicture}
\end{document}
\documentclass[tikz]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.14}
\begin{document}
\begin{tikzpicture}
  \begin{axis}[
    height=10cm,
    domain=0:1000,
    samples=201,
    grid=both,
    axis lines=center,
    clip=false,
  ]
    \addplot[color=blue!70] {sin(x)} 
      node[pos=.83, anchor=west] {$f(x) = \sin(x)$};
  \end{axis}
\end{tikzpicture}
\end{document}
\documentclass[border=5pt]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
    \draw[line cap=rect]
        \foreach \a in {0,...,5}{
            (0,\a)--(13,\a)
        }
        \foreach \a in {0,...,13}{
            (\a,0)--(\a,5)
        }
    ;

    \foreach \a in {0,...,5}{
        \foreach \b in {0,...,13}{
            \pgfmathsetmacro\q{5*\b/13}
            \ifdim\q pt<\a pt
                \draw[fill=black] (\b,\a) circle (0.1);
            \else
                \draw[] (\b,\a) circle (0.1);
            \fi
        }
    }

    \draw[dashed] (0,0)--(13,5);
\end{tikzpicture}
\end{document}
\documentclass[border=5pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{shapes}

\begin{document}
\begin{tikzpicture}[thick]
	\draw (0,-5) -- (0,-6) (1,-6) -- (2,-6) (0,-8) -- (0,-10);
	\draw (0,-6) -- (-2,-6) (-2,-7) -- (-2,-5);
	\draw (-3,-6) -- (-2,-6) (0,-4) -- (0,-5) (2,-6) -- (3,-6) (0,-10) -- (0,-11); 
	\draw (0,-6) -- (1,-6) (1,-5) -- (1,-7);
	\draw (0,-6) -- (0,-8);
	\draw (0,-8) -- (1,-8);
	\draw (0,-9) -- (-1,-9);
	
	\node [fill,circle,scale=0.5] at (0,-4) {};
	\node at (-1,-5) {$D$};
	\node [fill,regular polygon, regular polygon sides=4,scale=0.5] at (0,-5) {};
	\node [fill,diamond,scale=0.5,label=above right:$d$] at (0,-6) {};
	\node [fill,star, star points=5,scale=0.5] at (0,-9) {};
	\node [fill,star, star points=5,scale=0.5] at (0,-10) {};
	\node [fill,star, star points=5,scale=0.5] at (-1,-9) {};
	\node [fill,circle,scale=0.5,label={[yshift=-0.3cm] above left:$d_2$}] at (0,-11) {};
	\node [fill,diamond,scale=0.5] at (1,-6) {};
	\node [fill,diamond,scale=0.5] at (1,-5) {};
	\node [fill,diamond,scale=0.5] at (1,-7) {};
	\node [fill,regular polygon, regular polygon sides=4,scale=0.5] at (2,-6) {};
	\node [fill,circle,scale=0.5] at (3,-6) {};
	\node [fill,regular polygon, regular polygon sides=4,scale=0.5] at (-1,-6) {};
	\node [fill,regular polygon, regular polygon sides=4,scale=0.5] at (-2,-6) {};
	\node [fill,regular polygon, regular polygon sides=4,scale=0.5] at (-2,-5) {};
	\node [fill,regular polygon, regular polygon sides=4,scale=0.5] at (-2,-7) {};
	\node [fill,circle,scale=0.5] at (-3,-6) {};
	\node [fill,regular polygon, regular polygon sides=4,scale=0.5] at (0,-7) {};
	\node [fill,regular polygon, regular polygon sides=4,scale=0.5] at (1,-8) {};
	\node [fill,regular polygon, regular polygon sides=4,scale=0.5,label={[yshift=-0.3cm] above left:$d_1$}] at (0,-8) {};
\end{tikzpicture}
\end{document}
\documentclass[border=5pt]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}

\begin{document}
\begin{tikzpicture}
\begin{axis}[
    title={Max ratio},
    xlabel={$r$},
    ylabel={Max Ratio},
    xmin=0, xmax=21,
    ymin=0, ymax=50,
    xtick={0,2,4,6,8,10,12,14,16,18,20},
    ytick={0,5,10,15,20,25,30,35},
    legend pos=outer north east,
    ymajorgrids=true,
    grid style=dashed,
]

\addplot coordinates { (1,8)(2,8)(3,8)(4,8)(5,8)(6,8)(7,8)(8,8)(9,8)(10,8)(11,8)(12,8)(13,8)(14,8)(15,8)(16,8)(17,8)(18,10)(19,12)(20,12) };
\addplot coordinates { (1,10)(2,10)(3,10)(4,10)(5,10)(6,10)(7,10)(8,10)(9,10)(10,10)(11,10)(12,10)(13,10)(14,10)(15,14)(16,14)(17,18)(18,26)(19,30) };
\addplot [color=violet, mark=triangle] coordinates { (1,12)(2,12)(3,12)(4,12)(5,12)(6,12)(7,12)(8,12)(9,12)(10,12)(11,12)(12,12)(13,14)(14,18)(15,24) };
\addplot [color=teal, mark=triangle] coordinates { (1,14)(2,14)(3,14)(4,14)(5,14)(6,14)(7,14)(8,14)(9,14)(10,14)(11,16)(12,22)(13,30) };
\addplot [color=olive, mark=*] coordinates { (1,16)(2,16)(3,16)(4,16)(5,16)(6,16)(7,16)(8,16)(9,18)(10,22)(11,26)(12,38) };
\addplot [color=magenta, mark=*] coordinates { (1,18)(2,18)(3,18)(4,18)(5,18)(6,18)(7,18)(8,20)(9,22)(10,32) };
\addplot [color=yellow, mark=*] coordinates { (1,20)(2,20)(3,20)(4,20)(5,20)(6,20)(7,20)(8,26) };
\addplot [color=cyan, mark=triangle] coordinates { (1,22)(2,22)(3,22)(4,22)(5,22)(6,22)(7,28) };
\addplot [color=green, mark=*] coordinates { (1,24)(2,24)(3,24)(4,24)(5,24)(6,24) };
\addplot [color=orange, mark=*] coordinates { (1,26)(2,26)(3,26)(4,26)(5,26)(6,28) };
\addplot [color=pink, mark=*] coordinates { (1,28)(2,28)(3,28)(4,28)(5,28) };
\addplot [color=black, mark=*] coordinates { (1,30)(2,30)(3,30)(4,30) };
\addplot coordinates { (1,32)(2,32)(3,32)(4,32) };

\legend{$n=800$, $n=900$, $n=1000$, $n=1100$, $n=1200$, $n=1300$, $n=1400$, $n=1500$, $n=1600$, $n=1700$, $n=1800$, $n=1900$, $n=2000$}
\end{axis}
\end{tikzpicture}
\end{document}
\documentclass[tikz,border=5pt]{standalone}
\usetikzlibrary{patterns}

\begin{document}
\begin{tikzpicture}[scale=.9, transform shape]
  \draw (0,0) grid (4,2);
  \node[circle, fill=red] (a) at (0,0) {};
  \node[circle, fill=red] (b) at (4,0) {};
  \draw[ultra thick, red] (0,0) -- (1,0) -- (2,1) -- (3,0) -- (4,0);
\end{tikzpicture}
\end{document}
\documentclass[tikz]{standalone}
\usetikzlibrary{shapes, positioning, calc}

\begin{document}

\begin{tikzpicture}[xscale=3,yscale=1.5]
    \tikzstyle{neuron}=[circle,draw=black,minimum size=37pt,inner sep=0pt]
    \tikzstyle{neuron2}=[%
                       rectangle split,
                       rectangle split horizontal,
                       rectangle split parts=2,
                       rounded corners=18pt,
                       minimum size=37pt,
                       minimum width=4.5cm,
                       text width=1cm,
                       draw=black]

    \node[neuron] (I1) at (0,5) {$x_1$};
    \node[above=-0.05 of I1]{$n_1^{(1)}$};
    \node[neuron] (I2) at (0,3) {$x_2$};
    \node[above=-0.05 of I2]{$n_2^{(1)}$};

    \node[neuron2] (H1) at (2,7) {
      \nodepart[text width=1cm]{one}
      \nodepart[text width=1cm]{two} } ;
    \node[above=-0.05 of H1]{$n_1^{(2)}$};
    \node at (H1) {$\sum$\hspace{4ex}$\varphi$} ;
    
    \node[neuron2] (H2) at (2,5) {
      \nodepart[text width=1cm]{one}
      \nodepart[text width=1cm]{two} } ;
    \node[above=-0.05 of H2]{$n_2^{(2)}$};
    \node at (H2) {$\sum$\hspace{4ex}$\varphi$} ;
    
    \node[neuron2] (H3) at (2,3) {
      \nodepart[text width=1cm]{one}
      \nodepart[text width=1cm]{two} } ;
    \node[above=-0.05 of H3]{$n_3^{(2)}$};
    \node at (H3) {$\sum$\hspace{4ex}$\varphi$} ;
    
    \node[neuron2] (H4) at (2,1) {
      \nodepart[text width=1cm]{one}
      \nodepart[text width=1cm]{two} } ;
    \node[above=-0.05 of H4]{$n_4^{(2)}$};
    \node at (H4) {$\sum$\hspace{4ex}$\varphi$} ;

    \node[neuron2] (O1) at (4,5) {
      \nodepart[text width=1cm]{one}
      \nodepart[text width=1cm]{two}} ;
    \node[above=-0.05 of O1]{$n_1^{(3)}$};
    \node at (O1) {$\sum$\hspace{4ex}$\varphi$} ;
    
    \node[neuron2] (O2) at (4,3) {
      \nodepart[text width=1cm]{one}
      \nodepart[text width=1cm]{two}} ;
    \node[above=-0.05 of O2]{$n_2^{(3)}$};
    \node at (O2) {$\sum$\hspace{4ex}$\varphi$} ;

    \draw[->] (I1) -- (H1) node[pos=.8,above] {$w_{11}^{(2)}$};
    \draw[->] (I1) -- (H2) node[pos=.9,above] {$w_{21}^{(2)}$};
    \draw[->] (I1) -- (H3) node[pos=.9,above] {$w_{31}^{(2)}$};
    \draw[->] (I1) -- (H4) node[pos=.9,above=.2] {$w_{41}^{(2)}$};
    
    \draw[->] (I2) -- (H1) node[pos=.7,above=.2] {$w_{12}^{(2)}$};
    \draw[->] (I2) -- (H2) node[pos=.8,above=.1] {$w_{22}^{(2)}$};
    \draw[->] (I2) -- (H3) node[pos=.8,above] {$w_{32}^{(2)}$};
    \draw[->] (I2) -- (H4) node[pos=.8,above] {$w_{42}^{(2)}$};
    
    \draw[->] (H1) -- (O1) node[pos=.8,above] {$w_{11}^{(3)}$};
    \draw[->] (H1) -- (O2) node[pos=1,above=.2] {$w_{21}^{(3)}$};
    
    \draw[->] (H2) -- (O1) node[pos=.8,above] {$w_{12}^{(3)}$};
    \draw[->] (H2) -- (O2) node[pos=.85,below=.1] {$w_{22}^{(3)}$};
    
    \draw[->] (H3) -- (O1) node[pos=.85,above=.1] {$w_{13}^{(3)}$};
    \draw[->] (H3) -- (O2) node[pos=.8,below] {$w_{23}^{(3)}$};
    
    \draw[->] (H4) -- (O1) node[pos=1,below=.1] {$w_{14}^{(3)}$};
    \draw[->] (H4) -- (O2) node[pos=.9,below] {$w_{24}^{(3)}$};   
\end{tikzpicture}

\end{document}