added nanmean, np.nanmax, and np.nanmin to dynamic calculations in plot2