This function simply plots shaded anomaly plots like the ones you might find in IPCC reports.
One question, I do have x as a Class 'datetime' (like... 2018-01-17), but getting this error:
Error using datetime/horzcat (line 1286)
All inputs must be datetimes or date/time character
vectors or date/time strings.
Error in anomaly>intersections (line 290)
xy1 = [x1 y1];
Error in anomaly (line 115)
[xc,yc] = intersections(x,y,[x(1) x(end)],[base base]);
% intersections is a subfunction by Douglas Schwarz,
Inspired by: Shade area between two curves, IPCC2mat, Shade Anomaly, gtfill(x,y1,y2,n,c1,c2), b2r(cmin_input,cmax_input), fill_between, mseb(x,y,errBar,lineProps,transparent), cmocean perceptually-uniform colormaps, Fast and Robust Curve Intersections