update plot.py to support degree distribution plotting