Removed redundant array in plotting code