plot and code