created the plots macro