def plotCorrDiff(array1, array2, title, filepath): """ A function to produce plots of correlation differences. Parameters: ----------- array1 : observational dataset. Output of corr() array2 : modelled dataset. Output of corr() """ corrDiff_array = corrDiff(array1, array2) if corrDiff_array != None: Dict6 = mapCorr() myplot = plot(corrDiff_array, Dict6, labels=False, grid=False, oceans=False, cbar=True) reload(maps_sub) from maps_sub import saveFig saveFig(myplot, title, filepath) else: array = np.zeros((27, 22)) Dict6 = mapCorr() myplot = plot(array, Dict6, labels=False, grid=False, oceans=False, cbar=True) reload(maps_sub) from maps_sub import saveFig saveFig(myplot, title, filepath) return
def plotCorr(rainfall,index,title,filepath): """ A function to produce plots of correlations. """ var = corr(rainfall,index) var2 = ma.masked_invalid(var) Dict6 = mapCorr() myplot = plot(var2,Dict6,labels=False,grid=False,oceans=False,cbar=True) reload(maps_sub) from maps_sub import saveFig saveFig(myplot,title,filepath) return
def plotCorrDiff(array1,array2,title,filepath): """ A function to produce plots of correlation differences. Parameters: ----------- array1 : observational dataset. Output of corr() array2 : modelled dataset. Output of corr() """ corrDiff_array = corrDiff(array1,array2) if corrDiff_array != None: Dict6 = mapCorr() myplot = plot(corrDiff_array,Dict6,labels=False,grid=False,oceans=False,cbar=True) reload(maps_sub) from maps_sub import saveFig saveFig(myplot,title,filepath) else: array = np.zeros((27,22)) Dict6 = mapCorr() myplot = plot(array,Dict6,labels=False,grid=False,oceans=False,cbar=True) reload(maps_sub) from maps_sub import saveFig saveFig(myplot,title,filepath) return
def plotCorr(rainfall, index, title, filepath): """ A function to produce plots of correlations. """ var = corr(rainfall, index) var2 = ma.masked_invalid(var) Dict6 = mapCorr() myplot = plot(var2, Dict6, labels=False, grid=False, oceans=False, cbar=True) reload(maps_sub) from maps_sub import saveFig saveFig(myplot, title, filepath) return