xoa.plot.plot_taylor#
- xoa.plot.plot_taylor(obj, ref, dim=None, normalize=False, labels=None, values=None, diagram=None, **kwargs)[source]#
Plot a Taylor diagram of arrays against a reference
The standard deviation, the correlation with the reference and the centered root mean square difference are computed over the dimensions
dim, and the other dimensions create the points of the diagram. The samples that are missing in the array or in the reference are ignored. Correlations may be negative.- Parameters:
obj (xarray.DataArray, xarray.Dataset) – Array to evaluate. With a dataset, each variable gives at least one point.
ref (xarray.DataArray, xarray.Dataset, str) – Reference, which is broadcast against the array. With a dataset, it can be a variable name, or a dataset whose variables have the names of the variables of
obj.dim (None, str, list(str)) – Dimensions where the statistics are computed, which are all the dimensions by default, giving a single point per variable. Dimensions that are not listed create points.
normalize (bool) – Divide the standard deviations by the one of the reference, which is thus at 1. It is required when the reference has different standard deviations for the points.
labels (None, list(str)) – Labels of the points, that are shown in the legend. They are made from the variable names and the coordinates of the point dimensions by default.
values (None, array_like, xarray.DataArray) – One value per point, with the same order, that colors the markers instead of the legend, with a colorbar labelled with
get_label().diagram (None, xoa.core.plot.TaylorDiagram) – Existing diagram
kwargs – Extra parameters, like
markers,colors,rmax,rms_levelsorcmap, are passed toxoa.core.plot.plot_taylor().
- Returns:
xoa.core.plot.TaylorDiagram
Example
# One point per model, statistics over time and space plot_taylor(ds.sst_models, ds.sst_obs, dim=("time", "lat", "lon"), markers=["o", "s"]) # One point per variable of a dataset plot_taylor(ds_models, ref=ds_obs, normalize=True)