Connecting two tikz pictures with arrow - latex

I am trying to draw an arrow to link these two pictures and demonstrate the rotation. Can I do this with this minipage idea or do I need to draw them differently?
\begin{minipage}{0,5\textwidth}
\begin{center}
\begin{tikzpicture}
\draw (0,2)--(0,-2);
\draw (-2,0)--(2,0);
\newdimen\R
\R=1.5cm
\draw (36:\R)
\foreach \x in {36,108,180,252,324} { -- (\x:\R) }
-- cycle (36:\R) node[right] {4}
-- cycle (108:\R) node[above] {5}
-- cycle (180:\R) node[below] {1}
-- cycle (252:\R) node[below] {2} -- cycle (324:\R) node[right] {3};
\end{tikzpicture}
\end{center}
\end{minipage}
\begin{minipage}{0,5\textwidth}
\begin{center}
\begin{tikzpicture}
\draw (0,2)--(0,-2);
\draw (-2,0)--(2,0);
\newdimen\R
\R=1.5cm
\draw (36:\R)
\foreach \x in {36,108,180,252,324} { -- (\x:\R) }
-- cycle (36:\R) node[right] {3}
-- cycle (108:\R) node[above] {4}
-- cycle (180:\R) node[below] {5}
-- cycle (252:\R) node[below] {1} -- cycle (324:\R) node[right] {2};
\end{tikzpicture}
\end{center}
\end{minipage}

In theory you could use the tikzmark library to draw arrows between your two minipages, but I think it is easier to just put both drawing in a single tikzpicture:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{center}
\begin{tikzpicture}
\begin{scope}
\draw (0,2)--(0,-2);
\draw (-2,0)--(2,0);
\newdimen\R
\R=1.5cm
\draw (36:\R)
\foreach \x in {36,108,180,252,324} { -- (\x:\R) }
-- cycle (36:\R) node[right] {4}
-- cycle (108:\R) node[above] {5}
-- cycle (180:\R) node[below] {1}
-- cycle (252:\R) node[below] {2} -- cycle (324:\R) node[right] {3};
\end{scope}
\begin{scope}[xshift=6cm]
\draw (0,2)--(0,-2);
\draw (-2,0)--(2,0);
\newdimen\R
\R=1.5cm
\draw (36:\R)
\foreach \x in {36,108,180,252,324} { -- (\x:\R) }
-- cycle (36:\R) node[right] {3}
-- cycle (108:\R) node[above] {4}
-- cycle (180:\R) node[below] {5}
-- cycle (252:\R) node[below] {1} -- cycle (324:\R) node[right] {2};
\end{scope}
\draw[red,<->] (2.3,0) -- (3.8,0);
\end{tikzpicture}
\end{center}
\end{document}

Related

Change position of l shaped arrows in tikz

I am trying to change the location of the l-shaped arrows in the following chart. Basically I want the arrows coming off of "Regimes of sovereign states" to start lower in the box (lower on the y axis) so that they don't interfere with the "Non-regimes" box. Is there a simple way to do this?
Here's a reproducible example:
\documentclass[12pt]{article}
\usepackage[margin=1in]{geometry}
\usepackage{graphicx}
\usepackage{pdflscape}
\usepackage{palatino}
\usepackage[table,xcdraw]{xcolor}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric, arrows, positioning}
\tikzstyle{arrow}=[draw, -latex]
\tikzstyle{tblock} = [rectangle, rounded corners, minimum width=4cm, minimum height=3cm,text centered, draw=black, fill=white]
\tikzstyle{autoblock} = [rectangle, rounded corners, minimum width=4cm, minimum height=3cm,text centered, draw=black, fill=gray!20]
\begin{figure}[H]
\caption{Concept Ladder of Regime Types: Residual vs. Substantive Authoritarianism\\}
\vspace*{10mm}
\centering
\begin{tikzpicture}
\node (state) [tblock, text width=3cm] {States of the world};
\node (reg) [tblock, below left= 1cm and .25cm of state, text width=3cm] {Regimes \\ (of sovereign states)};
\node (nonreg) [autoblock, below right= 1cm and .25cm of state, text width=3cm] {Non-regimes \\ (anarchy, foreign \\ occupation, transition)};
\draw [arrow] (state) -- (reg);
\draw [arrow] (state) -- (nonreg);
\node (demone) [tblock, below left=2cm and .25cm of reg, text width=3cm] {Democratic regimes};
\draw [arrow] (reg) -| (demone);
\node (auto) [autoblock, below right=2cm and 4.5cm of reg, text width=3cm] {Authoritarian regimes \\ (substantive authoritarianism)};
\draw [arrow] (reg) -| (auto);
\node (lfs) [autoblock, below = 2cm of reg, text width=3cm] {Limited franchise \\ systems};
\draw [arrow] (reg) -- (lfs);
\node (dfr) [autoblock, below right=2cm and .25cm of reg, text width=3cm] {Dominant faction \\ regimes};
\draw [arrow] (reg) -| (dfr);
\end{tikzpicture}
\end{figure}
\end{document}`
I haven't actually tried anything to fix this because I don't really know where to start. I googled "change length of l shaped arrows tikz" and came up with nothing. If you have any suggestions, I would very much appreciate it.
\tikzstyle is deprecated, use \tikzset instead
your example is missing the float package
\documentclass[12pt]{article}
\usepackage[margin=1in]{geometry}
\usepackage{graphicx}
\usepackage{pdflscape}
\usepackage{palatino}
\usepackage[table,xcdraw]{xcolor}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric, arrows, positioning}
\tikzset{arrow/.style={draw, -latex}}
\tikzset{tblock/.style={rectangle, rounded corners, minimum width=4cm, minimum height=3cm,text centered, draw=black, fill=white}}
\tikzset{autoblock/.style={rectangle, rounded corners, minimum width=4cm, minimum height=3cm,text centered, draw=black, fill=gray!20}}
\usepackage{float}
\begin{document}
\begin{figure}[H]
\caption{Concept Ladder of Regime Types: Residual vs. Substantive Authoritarianism\\}
\vspace*{10mm}
\centering
\begin{tikzpicture}
\node (state) [tblock, text width=3cm] {States of the world};
\node (reg) [tblock, below left= 1cm and .25cm of state, text width=3cm] {Regimes \\ (of sovereign states)};
\node (nonreg) [autoblock, below right= 1cm and .25cm of state, text width=3cm] {Non-regimes \\ (anarchy, foreign \\ occupation, transition)};
\draw [arrow] (state) -- (reg);
\draw [arrow] (state) -- (nonreg);
\node (demone) [tblock, below left=2cm and .25cm of reg, text width=3cm] {Democratic regimes};
\draw [arrow] (reg.south) -- ++(0,-1cm) -| (demone);
\node (auto) [autoblock, below right=2cm and 4.5cm of reg, text width=3cm] {Authoritarian regimes \\ (substantive authoritarianism)};
\draw [arrow] (reg.south) -- ++(0,-1cm) -| (auto);
\node (lfs) [autoblock, below = 2cm of reg, text width=3cm] {Limited franchise \\ systems};
\draw [arrow] (reg) -- (lfs);
\node (dfr) [autoblock, below right=2cm and .25cm of reg, text width=3cm] {Dominant faction \\ regimes};
\draw [arrow] (reg.south) -- ++(0,-1cm) -| (dfr);
\end{tikzpicture}
\end{figure}
\end{document}

Latex beamer error: argument of \language#active#arg" has an extra }. \end{frame}

I'm trying to put together a presentation using latex beamer. I drew a triangle using the tikz package but I can't put the names on the angles. When executing the code, the following error appears: "Argument of \language#active#arg" has an extra }. \end{frame}"
The code is:
\documentclass[xcolor=dvipsnames,10pt,serif]{beamer} % serif, mathserif
\usepackage[english,brazil]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{ae}
\setbeamertemplate{caption}[numbered]
\setlength\abovecaptionskip{-3pt}
\setbeamertemplate{caption}[numbered]
\setbeamerfont{caption}{size=\scriptsize}
\usefonttheme[onlymath]{serif}
\usepackage{color}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amstext}
\usepackage{mathrsfs}
\usepackage{icomma}
\usepackage{bm}
\usepackage{steinmetz}
\usepackage{tikz}
\usepackage{adjustbox}
\usepackage{subfigure}
\usepackage{ragged2e}
\usepackage{tkz-euclide}
\usetikzlibrary{angles,quotes,babel}
\DeclareMathOperator{\sen}{sen}
\mode<presentation>
{
\usetheme{CambridgeUS}
}
\begin{document}
\begin{frame}{Frame Title}
\begin{figure}
\begin{tikzpicture}
\coordinate (C) at (-1.5,-1);
\coordinate (A) at (1.5,-1);
\coordinate (B) at (1.5,1);
\coordinate (D) at (1.5,-3);
\node [below] at (3,-1) {$\Re$};
\node [above] at (-1.5,2) {$\Im$};
%draw cartesian plane
\draw[stealth-stealth] (-1.5,-4) -- (-1.5,2) coordinate (y axis);
\draw[-stealth] (C) -- (3,-1) coordinate (x axis);
\draw[very thick,-{Stealth[length=3mm, width=1.5mm]}] (C) --
node[font=\Large,sloped,above] {$S_{abc}$} (B);
\draw[very thick,-{Stealth[length=3mm, width=1.5mm]}](A) --
node[font=\Large,pos=0.7,right] {$Q_{abc}$} (B);
\draw[very thick,-{Stealth[length=3mm, width=1.5mm]}](C) --
node[font=\Large,pos=0.8,above] {$P_{abc}$} (A);
\draw[very thick,-{Stealth[length=3mm, width=1.5mm]}](C) --
node[font=\Large,sloped,below] {$S_{abc}$} (D);
\draw[very thick,{Stealth[length=3mm, width=1.5mm]}-](D)--
node[font=\Large,pos=0.3,right] {$-Q_{abc}$} (A) ;
\pic[thick,"$\theta$", draw=blue,-stealth, angle eccentricity=1.2, angle radius=1cm]
{angle=A--C--B};
\pic[thick,"$\theta$", draw=red, stealth-, angle eccentricity=1.2, angle radius=0.9cm]
{angle=D--C--A};
\end{tikzpicture}
\end{figure}
\end{frame}
\end{document}
Can anybody help me?
If you have fragile content in your frame, like certain tikz pictures, use the fragile frame option.
Some other comments:
the serif class option is obsolete. A warning in the log file will tell you to use the serif font theme instead, but as you already do this, there is really no reason to use this class option
if your tex distribution isn't terrible outdated, you no longer need \usepackage[utf8]{inputenc}
there are two \setbeamertemplate{caption}[numbered]
you don't need color and the ams* packages, beamer already loads them for you
\documentclass[xcolor=dvipsnames,10pt]{beamer} % serif, mathserif
\usepackage[english,brazil]{babel}
%\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{ae}
\setbeamertemplate{caption}[numbered]
\setlength\abovecaptionskip{-3pt}
%\setbeamertemplate{caption}[numbered]
\setbeamerfont{caption}{size=\scriptsize}
\usefonttheme[onlymath]{serif}
%\usepackage{color}
%\usepackage{amsmath}
%\usepackage{amsfonts}
%\usepackage{amssymb}
%\usepackage{amstext}
\usepackage{mathrsfs}
\usepackage{icomma}
\usepackage{bm}
\usepackage{steinmetz}
\usepackage{tikz}
\usepackage{adjustbox}
\usepackage{subfigure}
\usepackage{ragged2e}
\usepackage{tkz-euclide}
\usetikzlibrary{angles,quotes,babel}
\DeclareMathOperator{\sen}{sen}
\mode<presentation>
{
\usetheme{CambridgeUS}
}
\begin{document}
\begin{frame}[fragile]
\frametitle{Frame Title}
\begin{figure}
\begin{tikzpicture}
\coordinate (C) at (-1.5,-1);
\coordinate (A) at (1.5,-1);
\coordinate (B) at (1.5,1);
\coordinate (D) at (1.5,-3);
\node [below] at (3,-1) {$\Re$};
\node [above] at (-1.5,2) {$\Im$};
%draw cartesian plane
\draw[stealth-stealth] (-1.5,-4) -- (-1.5,2) coordinate (y axis);
\draw[-stealth] (C) -- (3,-1) coordinate (x axis);
\draw[very thick,-{Stealth[length=3mm, width=1.5mm]}] (C) --
node[font=\Large,sloped,above] {$S_{abc}$} (B);
\draw[very thick,-{Stealth[length=3mm, width=1.5mm]}](A) --
node[font=\Large,pos=0.7,right] {$Q_{abc}$} (B);
\draw[very thick,-{Stealth[length=3mm, width=1.5mm]}](C) --
node[font=\Large,pos=0.8,above] {$P_{abc}$} (A);
\draw[very thick,-{Stealth[length=3mm, width=1.5mm]}](C) --
node[font=\Large,sloped,below] {$S_{abc}$} (D);
\draw[very thick,{Stealth[length=3mm, width=1.5mm]}-](D)--
node[font=\Large,pos=0.3,right] {$-Q_{abc}$} (A) ;
\pic[thick,"$\theta$", draw=blue,-stealth, angle eccentricity=1.2, angle radius=1cm]
{angle=A--C--B};
\pic[thick,"$\theta$", draw=red, stealth-, angle eccentricity=1.2, angle radius=0.9cm]
{angle=D--C--A};
\end{tikzpicture}
\end{figure}
\end{frame}
\end{document}

Weird diagrams using chains within tikz

I am trying to replicate some diagrams that I made using Microsoft Visio, using the tikz package in LaTeX. The basic diagrams are relatively easy to build, but when it comes to add more than two nodes next to each other, it gets quite tricky... I can't seem to find any documentation that justifies my needs to center and align the nodes like I've done in Visio.
These are the MS Visio diagrams:
But this is what I have got right now, using Tikz:
Here is a minimal reproducible example:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usepackage{svg}
\usepackage{amsmath}
\usetikzlibrary{shapes.geometric, arrows, chains}
%%
%%TikZ Settings
\tikzstyle{main} = [rectangle, minimum width=3cm, minimum height=0.6cm,text centered, text width=3cm, draw=black, fill=black!30]
\tikzstyle{arrow} = [thick,->,>=stealth]
\begin{document}
%The "Remediação" diagram
\begin{tikzpicture}[node distance=1.5cm]
\node (principal) [main] {Remediação};
\coordinate[below of=principal] (a);
\begin{scope}[start chain=going right]
\node (rem-vuln-c-patch) [main, on chain, below of=principal, left of=a] {Remediação de Vulnerabilidade Normal com \textit{patch}};
\node (rem-vuln-c-c-patch) [main, on chain] {Remediação de Vulnerabilidade Crítica com \textit{patch}};
\node (rem-vuln-config) [main, on chain] {Remediação de Vulnerabilidade por má configuração};
\node (gest-vuln-s-patch) [main, on chain] {Gestão de Vulnerabilidade sem \textit{patch}};
\end{scope}
\node(gest-risco) [main, align=center, below of=rem-vuln-c-c-patch] {Gestão de Risco};
\draw [arrow] (principal) -| (rem-vuln-c-patch);
\draw [arrow] (principal) -| (rem-vuln-c-c-patch);
\draw [arrow] (principal) -| (rem-vuln-config);
\draw [arrow] (principal) -| (gest-vuln-s-patch);
\draw [arrow] (gest-vuln-s-patch) |- (gest-risco);
\draw [arrow] (gest-risco) -| (rem-vuln-c-patch);
\draw [arrow] (gest-risco) -- (rem-vuln-c-c-patch);
\end{tikzpicture}
% The "Balanço" diagram
\begin{tikzpicture}[node distance=1.5cm]
\node (principal) [main] {Balanço};
\coordinate[below of=principal] (a);
\begin{scope}[start chain=going right]
\node (lic-apr) [main, on chain, below of=principal, left of=a] {Lições aprendidas};
\node (reu-retro) [main, on chain] {Reunião de Retrospetiva};
\node (cri-rel-exec) [main, on chain] {Criação do relatório executivo};
\end{scope}
\draw [arrow] (principal) -| (lic-apr);
\draw [arrow] (principal) -| (reu-retro);
\draw [arrow] (principal) -| (cri-rel-exec);
\end{tikzpicture}
\end{document}
Using a tree might be easier than a chain:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usepackage{svg}
\usepackage{amsmath}
\usetikzlibrary{shapes.geometric, arrows, chains,positioning}
%%
%%TikZ Settings
\tikzstyle{main} = [rectangle, minimum width=3cm, minimum height=2cm,text centered, text width=3cm, draw=black, fill=black!30]
\tikzstyle{arrow} = [thick,->,>=stealth]
\begin{document}
%The "Remediação" diagram
\begin{tikzpicture}[
level distance=3cm,
sibling distance=4cm,
edge from parent path={[thick,->](\tikzparentnode.south) -- ++(0,-1cm) -| (\tikzchildnode.north)}
]
\node[main,minimum height=0.6cm] (principal) {Remediação}
child { node[main] (rem-vuln-c-c-patch) {Remediação de Vulnerabilidade Crítica com \textit{patch}} }
child { node[main] (rem-vuln-c-patch) {Remediação de Vulnerabilidade Normal com \textit{patch}} }
child { node[main] (rem-vuln-config) {Remediação de Vulnerabilidade por má configuração} }
child { node[main] (gest-vuln-s-patch) {Gestão de Vulnerabilidade sem \textit{patch}} };
\node(gest-risco) [main, align=center, below=4.5cm of principal,minimum height=0.6cm] {Gestão de Risco};
\draw[->,thick] (gest-risco) -| (rem-vuln-c-c-patch);
\draw[->,thick] (gest-risco) -| (gest-vuln-s-patch);
\draw[->,thick] ([xshift=-1.0cm]gest-risco.north) -| ([xshift=1.8cm]rem-vuln-c-patch);
\end{tikzpicture}
\end{document}

Center two tikzpicture subfloats on a landscape page

I want to center two tikzpictures which are both in a own subfloat on a landscape page. With my example code the begin of the second timeline is shifted. You can see the shift in the picture. I want to have the beginnigs of the two timelines on the same horizontal line.
\documentclass[a4paper,11pt,smallchapters,blue,extramargin,lnum]{article}
\usepackage{lscape}
\usepackage{subfig}
\usepackage{graphicx}
\usepackage{tikz}
\begin{document}
\begin{landscape}
\vspace*{\fill}
\begin{figure}[h]
\begin{center}
\subfloat[Situation 1 \label{fig:situationen-2.impl-exp3:situation1}] {
\begin{tikzpicture}
% draw horizontal line
\draw (0,0) -- (15,0);
% draw vertical lines
\foreach \x in {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}
\draw (\x cm,3pt) -- (\x cm,-3pt);
% draw nodes
\draw (0,0) node[below=3pt] {$ 0s $} node[above=15pt] {Raspberry Pi} node[above=1pt] {sendet};
\draw (10,0) node[below=3pt] {$ 50s $} node[above=12pt] {Beginn} node[above=1pt] {Zustandswechsel};
\draw (15,0) node[below=3pt] {$ 150s $} node[above=3pt] {Ende};
\end{tikzpicture}
}
\newline
\subfloat[Situation 2 \label{fig:situationen-2.impl-exp3:situation2}] {
\begin{tikzpicture}
% draw horizontal line
\draw (0,0) -- (15,0);
% draw vertical lines
\foreach \x in {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}
\draw (\x cm,3pt) -- (\x cm,-3pt);
% draw nodes
\draw (0,0) node[below=3pt] {$ 0s $} node[above=15pt] {Raspberry Pi} node[above=1pt] {sendet};
\draw (5,0) node[below=3pt] {$ 50s $} node[above=12pt] {Beginn} node[above=1pt] {Zustandswechsel};
\draw (10,0) node[below=3pt] {$ 100s $} node[above=12pt] {Senderate} node[above=1pt] {kleiner};
\draw (15,0) node[below=3pt] {$ 150s $} node[above=3pt] {Ende};
\end{tikzpicture}
}
\caption{Untersuchte Situationen in Experiment 3 der 2.Implementierung} \label{fig:situationen-2.impl-exp2}
\end{center}
\end{figure}
\vspace*{\fill}
\end{landscape}
\end{document}
The problem is caused by the combination of centred text and the forced line break from \newline. You can avoid this by simply leaving an empty line to start a new paragraph:
\documentclass[a4paper,11pt,smallchapters,blue,extramargin,lnum]{article}
\usepackage{lscape}
\usepackage{subfig}
\usepackage{graphicx}
\usepackage{tikz}
\begin{document}
\begin{landscape}
\vspace*{\fill}
\begin{figure}[h]
\centering
% \begin{center}
\subfloat[Situation 1 \label{fig:situationen-2.impl-exp3:situation1}] {
\begin{tikzpicture}
% draw horizontal line
\draw (0,0) -- (15,0);
% draw vertical lines
\foreach \x in {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}
\draw (\x cm,3pt) -- (\x cm,-3pt);
% draw nodes
\draw (0,0) node[below=3pt] {$ 0s $} node[above=15pt] {Raspberry Pi} node[above=1pt] {sendet};
\draw (10,0) node[below=3pt] {$ 50s $} node[above=12pt] {Beginn} node[above=1pt] {Zustandswechsel};
\draw (15,0) node[below=3pt] {$ 150s $} node[above=3pt] {Ende};
\end{tikzpicture}
}
\subfloat[Situation 2 \label{fig:situationen-2.impl-exp3:situation2}] {
\begin{tikzpicture}
% draw horizontal line
\draw (0,0) -- (15,0);
% draw vertical lines
\foreach \x in {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}
\draw (\x cm,3pt) -- (\x cm,-3pt);
% draw nodes
\draw (0,0) node[below=3pt] {$ 0s $} node[above=15pt] {Raspberry Pi} node[above=1pt] {sendet};
\draw (5,0) node[below=3pt] {$ 50s $} node[above=12pt] {Beginn} node[above=1pt] {Zustandswechsel};
\draw (10,0) node[below=3pt] {$ 100s $} node[above=12pt] {Senderate} node[above=1pt] {kleiner};
\draw (15,0) node[below=3pt] {$ 150s $} node[above=3pt] {Ende};
\end{tikzpicture}
}
\caption{Untersuchte Situationen in Experiment 3 der 2.Implementierung} \label{fig:situationen-2.impl-exp2}
% \end{center}
\end{figure}
\vspace*{\fill}
\end{landscape}
\end{document}
(I'm using \centering instead of the center environment to avoid additional vertical spacing, but for your use case that's not really important)

How to insert special symbol in a picture

I had tried this code and I want the braces in the figure as there are in the attached picture.
\begin{figure}[hbt!]
\begin{center}
\begin{tikzpicture}[
thick,
acteur/.style={
circle,
fill=black,
thick,
inner sep=2pt,
minimum size=0.2cm
}
]
\node (a1) at (-0.3,0.65) [acteur,label=below :\scriptsize{}]{};
\node (a2) at (1,0)[acteur,label=below:\scriptsize{\hspace{0.3cm}$x_{0}$}]{};
\node (a3) at (2,0) [acteur,label=below:\scriptsize{$x_{1}$}]{};
\node (a4) at (3,0) [acteur,label=below:\scriptsize{$x_{2}$}]{};
\node (a5) at (4,0) [acteur,label=above :\scriptsize{}]{};
\node (a6) at (5,0) [acteur,label=below right :\scriptsize{\hspace{-0.9cm}$x_{k-s-t}$}]{};
\node (a7) at (6.5,0) [acteur,label=below:\scriptsize{}]{};
\node (a8) at (-0.3,-0.65) [acteur,label=above:\scriptsize{}]{};
\node (a9) at (0.4,1.3) [acteur,label=above:\scriptsize{}]{};
\node (a10) at (0.4,-1.3) [acteur,label=below:\scriptsize{}]{};
\node (a11) at (6,1) [acteur,label=below:\scriptsize{}]{};
\node (a12) at (6,-1) [acteur,label=below:\scriptsize{}]{};
\node (a13) at (5.3,1.3) [acteur,label=below:\scriptsize{}]{};
\node (a14) at (5.3,-1.3) [acteur,label=below:\scriptsize{}]{};
\draw (a1) -- (a2);
\draw (a2) -- (a9);
\draw (a2) -- (a8);
\draw (a2) -- (a10);
\draw (a2) -- (a3);
\draw (a3) -- (a4);
\draw [dashed] (a4) -- (a5);
\draw (a5) -- (a6);
\draw (a6) -- (a7);
\draw (a6) -- (a11);
\draw (a6) -- (a13);
\draw (a6) -- (a12);
\draw (a6) -- (a14);
\end{tikzpicture}
\end{center}
\caption{\small{The graph $\mathcal{P}(k,s,t)$}}
\end{figure}
You can use the decorations library
\documentclass[12pt]{article}
\usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing}
\begin{document}
\begin{figure}[hbt!]
\begin{center}
\begin{tikzpicture}[
thick,
acteur/.style={
circle,
fill=black,
thick,
inner sep=2pt,
minimum size=0.2cm
}
]
\node (a1) at (-0.3,0.65) [acteur,label=below :\scriptsize{}]{};
\node (a2) at (1,0)[acteur,label=below:\scriptsize{\hspace{0.3cm}$x_{0}$}]{};
\node (a3) at (2,0) [acteur,label=below:\scriptsize{$x_{1}$}]{};
\node (a4) at (3,0) [acteur,label=below:\scriptsize{$x_{2}$}]{};
\node (a5) at (4,0) [acteur,label=above :\scriptsize{}]{};
\node (a6) at (5,0) [acteur,label=below right :\scriptsize{\hspace{-0.9cm}$x_{k-s-t}$}]{};
\node (a7) at (6.5,0) [acteur,label=below:\scriptsize{}]{};
\node (a8) at (-0.3,-0.65) [acteur,label=above:\scriptsize{}]{};
\node (a9) at (0.4,1.3) [acteur,label=above:\scriptsize{}]{};
\node (a10) at (0.4,-1.3) [acteur,label=below:\scriptsize{}]{};
\node (a11) at (6,1) [acteur,label=below:\scriptsize{}]{};
\node (a12) at (6,-1) [acteur,label=below:\scriptsize{}]{};
\node (a13) at (5.3,1.3) [acteur,label=below:\scriptsize{}]{};
\node (a14) at (5.3,-1.3) [acteur,label=below:\scriptsize{}]{};
\draw (a1) -- (a2);
\draw (a2) -- (a9);
\draw (a2) -- (a8);
\draw (a2) -- (a10);
\draw (a2) -- (a3);
\draw (a3) -- (a4);
\draw [dashed] (a4) -- (a5);
\draw (a5) -- (a6);
\draw (a6) -- (a7);
\draw (a6) -- (a11);
\draw (a6) -- (a13);
\draw (a6) -- (a12);
\draw (a6) -- (a14);
\draw[decorate,decoration={brace,amplitude=10pt}]
(-0.5, -1) -- (-0.5, 1) node[left, midway, xshift = -10pt]{$s$ vertices};
\draw[decorate,decoration={brace,amplitude=10pt}]
(6.5, 1) -- (6.5, -1) node[right, midway, xshift = 10pt]{$t$ vertices};
\end{tikzpicture}
\end{center}
\caption{\small{The graph $\mathcal{P}(k,s,t)$}}
\end{figure}
\end{document}

Resources