added clear data button, attempted to add plot button, but the plotMax variable refuses to change