pyMAISE.preprocessing.correlation_matrix

pyMAISE.preprocessing.correlation_matrix(data, method='pearson', min_periods=1, fig=None, ax=None, colorbar=True, annotations=False)[source]

Create a correlation matrix for a data set. This function uses pandas.DataFrame.corr [M+10], for method and min_periods please refer to their documentation.

Parameters:
  • data (xarray.DataArray) – Raw data.

  • fig (matplotlib.figure or None, default=None) – Figure object. If None then one is created.

  • ax (matplotlib.pyplot.axis or None, default=None) – Axis object. If None then one is created.

  • colorbar (bool, default=True) – Add colorbar to plot.

  • annotations (bool, default=False) – Add annotations to elements.

Returns:

  • fig (matplotlib.figure) – Created or provided figure.

  • ax (matplotlib.pyplot.axis) – Created or provided axis.