# Drawing a specific curve with TikZ

I try to draw this diagram:

I write this code:

\documentclass[border=5pt]{standalone}

\usepackage{tikz}
\usepackage{siunitx}
\usetikzlibrary{quotes}
\usetikzlibrary{angles}
\usetikzlibrary{arrows}
\usetikzlibrary{automata}
\usetikzlibrary{calc}
\usetikzlibrary{decorations.pathreplacing,decorations.markings}

\usepackage{amsmath,amsfonts,amssymb}

\begin{document}

\begin{tikzpicture}[line cap=round]

% First, define nodes
\node[inner sep=0pt] (O1) at (0, 0) {};
\node[inner sep=0pt] (O2) at (0, 5) {};
\node[inner sep=0pt] (O3) at (5, 5) {};
\node[inner sep=0pt] (O4) at (5, 0) {};
\node[inner sep=0pt, label=$\boldsymbol{2}$] (A) at (1, 4) {};
\node[inner sep=0pt, label=$\boldsymbol{4}$] (A) at (2, 4) {};
\node[inner sep=0pt, label=$\boldsymbol{11}$] (A) at (3, 4) {};
\node[inner sep=0pt, label=$\boldsymbol{9}$] (A) at (4, 4) {};
\node[inner sep=0pt, label=$\boldsymbol{6}$] (A) at (1, 2.5) {};
\node[inner sep=0pt, label=$\boldsymbol{7}$] (A) at (2.5, 2.5) {};
\node[inner sep=0pt, label=$\boldsymbol{-1}$] (A) at (4, 2.5) {};
\node[inner sep=0pt, label=$\boldsymbol{-10}$] (A) at (1, 1) {};
\node[inner sep=0pt, label=$\boldsymbol{22}$] (A) at (2.5, 1) {};
\node[inner sep=0pt, label=$\boldsymbol{14}$] (A) at (4, 1) {};

\draw [line width=2pt, -] (O1) -- (O2);
\draw [line width=2pt, -] (O2) -- (O3);
\draw [line width=2pt, -] (O3) -- (O4);
\draw [line width=2pt, -] (O4) -- (O1);

%south east
%north west

\end{tikzpicture}

\end{document}


But I don't have any idea for drawing curve in it.

Something like that? You can add more coordinates for being more accurate with your curve and you can change the coordinates as you like to achieve the best curve shape you want. You can also use the option tension to make your curve more "loose" or more "stretched".

\documentclass[border=5pt]{standalone}

\usepackage{tikz}
\usepackage{siunitx}
\usetikzlibrary{quotes}
\usetikzlibrary{angles}
\usetikzlibrary{arrows}
\usetikzlibrary{automata}
\usetikzlibrary{calc}
\usetikzlibrary{decorations.pathreplacing,decorations.markings}

\usepackage{amsmath,amsfonts,amssymb}

\begin{document}

\begin{tikzpicture}[line cap=round]

% First, define nodes
\node[inner sep=0pt] (O1) at (0, 0) {};
\node[inner sep=0pt] (O2) at (0, 5) {};
\node[inner sep=0pt] (O3) at (5, 5) {};
\node[inner sep=0pt] (O4) at (5, 0) {};
\node[inner sep=0pt, label=$\boldsymbol{2}$] (A) at (1, 4) {};
\node[inner sep=0pt, label=$\boldsymbol{4}$] (A) at (2, 4) {};
\node[inner sep=0pt, label=$\boldsymbol{11}$] (A) at (3, 4) {};
\node[inner sep=0pt, label=$\boldsymbol{9}$] (A) at (4, 4) {};
\node[inner sep=0pt, label=$\boldsymbol{6}$] (A) at (1, 2.5) {};
\node[inner sep=0pt, label=$\boldsymbol{7}$] (A) at (2.5, 2.5) {};
\node[inner sep=0pt, label=$\boldsymbol{-1}$] (A) at (4, 2.5) {};
\node[inner sep=0pt, label=$\boldsymbol{-10}$] (A) at (1, 1) {};
\node[inner sep=0pt, label=$\boldsymbol{22}$] (A) at (2.5, 1) {};
\node[inner sep=0pt, label=$\boldsymbol{14}$] (A) at (4, 1) {};

\draw [line width=2pt, -] (O1) -- (O2);
\draw [line width=2pt, -] (O2) -- (O3);
\draw [line width=2pt, -] (O3) -- (O4);
\draw [line width=2pt, -] (O4) -- (O1);

%south east
%north west

\draw plot [smooth] coordinates {(2.5,0.8) (0.8,2.2) (0.9,3) (1.8,4.6) (3.3,4.4) (3.5,3.7) (3,1) (2.5,0.8)}; % <<<<<<
% this is the curve you can change it as you like by changing the coordinates.

\end{tikzpicture}