%\documentclass{standalone}
\documentclass[convert={density=300,size=800x400,outext=.png}]{standalone}
\usepackage{amsmath}
\usepackage{pgfplots}
\pgfplotsset{compat=1.16}
\usetikzlibrary{calc}
\usetikzlibrary{positioning}
\usetikzlibrary{decorations.markings}
\usetikzlibrary{math} % tikzmath, see p. 640 of the pgfmanual.
\usetikzlibrary{arrows}
\usepackage{svgcolor} 
\begin{document}
\begin{tikzpicture}
%\useasboundingbox (-2,-2.8) rectangle (10,2.8);
\filldraw[white] (-1.5,-2.3) rectangle (9.5,2.3);
\tikzstyle{vrh}=[draw,circle,fill=yellow,text=black]
\node[vrh,inner sep=2pt] (s) at (-1,0) {$s$};
\node[vrh,inner sep=1.5pt] (w) at (4,1.8) {$w$};
\node[vrh,inner sep=2pt] (x) at (2.5,0) {$x$};
\node[vrh,inner sep=2pt] (z) at (4,-1.8) {$z$};
\node[vrh,inner sep=1.5pt] (y) at (5.5,0) {$y$};
\node[vrh,inner sep=2pt] (t) at (9,0) {$t$};
\draw[->,>=stealth'] (s)--(w) node[pos=0.55,fill=white,inner sep=2pt] {$4,4$};
\draw[->,>=stealth'] (s)--(x) node[pos=0.58,fill=white,inner sep=3pt] {$7,7$};
\draw[->,>=stealth'] (s)--(z) node[pos=0.55,fill=white,inner sep=3pt] {$10,6$};
\draw[->,>=stealth'] (x)--(w) node[pos=0.42,fill=white,inner sep=4pt] {$2,0$};
\draw[->,>=stealth'] (x)--(z) node[pos=0.45,fill=white,inner sep=2pt] {$2,0$};
\draw[->,>=stealth'] (x)--(y) node[pos=0.5,fill=white,inner sep=4pt] {$10,7$};
\draw[->,>=stealth'] (w)--(y) node[pos=0.5,fill=white,inner sep=2pt] {$2,0$};
\draw[->,>=stealth'] (z)--(y) node[pos=0.5,fill=white,inner sep=3pt] {$2,0$};
\draw[->,>=stealth'] (w)--(t) node[pos=0.5,fill=white,inner sep=3pt] {$10,4$};
\draw[->,>=stealth'] (y)--(t) node[pos=0.45,fill=white,inner sep=3pt] {$7,7$};
\draw[->,>=stealth'] (z)--(t) node[pos=0.45,fill=white,inner sep=3pt] {$6,6$};
\end{tikzpicture}
\end{document}