UCL-EO/geog0111

notebook 023_Plotting.ipynb small problem caused by nan value

Closed this issue · 0 comments

Notebook 023_Plotting.ipynb - the example data in Errorbar Section have NAN values for 2022 Oct-Dec because there is no data for these months yet.

The error bar graph cannot be plotted correctly unless get rid of nan in std. So, I would suggest to replace:

mean = np.array(df[months]).mean(axis=1)
std  = np.array(df[months]).std(axis=1)

by:

mean = np.nanmean(np.array(df[months]), axis=1)
std  = np.nanstd(np.array(df[months]), axis=1)