Fix IndexError Problem with dplot.py