Created drawGraphB function