\documentclass[12pt,a4paper]{article}
 \usepackage{tikz}
 \usepackage{tkz-euclide}
 \usepackage{xepersian}
 \begin{document}
 \begin{tikzpicture}
 \tkzInit[xmin=-4.5,xmax=4,xstep=1]
 \tkzAxeX[label={}]
 \coordinate (A) at (3,0);
 \coordinate (B) at (-3,0);
 
 \shadedraw [ball color= red] (A) circle (.1cm);
 \shadedraw [ball color= green] (B) circle (.1cm);
 
 \node[below=2pt,text=blue,fill=red] at (4,0) {$4$};
 
 \tkzDrawSegment[ultra thick, color=blue](B,A)
 \end{tikzpicture}
\end{document}