Extracting the D vector from the method, adjusting the plotting functions
updated to version 0.4