First, the working code:
\documentclass[journal]{IEEEtran}
\usepackage{libertine}
\usepackage{cite}
\usepackage{url}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage{mathtools}
\usepackage{setspace}
\usepackage{algorithm}
\usepackage{algorithmicx}
\usepackage{algpseudocode}
\usepackage[english]{babel}
\usepackage{tikz}
\usetikzlibrary{arrows}
\begin{document}
\begin{center}
\begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=3cm,
thick,main node/.style={,fill=white!20,draw,font=\sffamily\small\bfseries}]
\node[main node] (dancing) {dancing};
\node[main node] (monkey) [below of=dancing] {monkey};
\path[every node/.style={font=\sffamily\small}]
(dancing) edge node [below] {test} (monkey)
;
\end{tikzpicture}
\end{center}
\end{document}
As shown below, I get overlapping text with the arrow.
Is there a way to change this? Can I also modify the size of the arrow for individual arrows in my graph?
Thanks a lot!
node [below] {test}
tonode [right] {test}
then the label is printed to the right of the arrow. See customizing-arrows-with-tikz, for example, on how to customise the arrows