added plotting for arrays