plotting using networkx and matplotlib