Finished editing plotting functions