lib.data_vector.plotting.CorrelationMatrixPlotStyle¶
- class lib.data_vector.plotting.CorrelationMatrixPlotStyle(style=None, data_styles=None, **kwargs)¶
Bases:
lib.data_vector.plotting.CovarianceMatrixPlotStylePlotting style for correlation matrix.
Initialize
CovarianceMatrixPlotStyle.- Parameters
style (CovarianceMatrixPlotStyle, default=None) – A plotting style to start from, which will be updated with
kwargs.data_styles (DataPlotStyle, tuple, default=None) – Data vector plotting style(s), used to get projections to be plotted, and x-labels. Can be left
Nonein most use cases.kwargs (dict) – Attributes for
BaseDataPlotStyle.
Methods
Return shallow copy of
self.deepcopyInstantiate and initalize class with state dictionary.
Return
valueif notNone, else attributenameif notNone, elsedefault.Same as
get(), but ensuring returned value is a list.Return covariance array, without view.
Return styles for input covariance.
is_mpi_broadcastis_mpi_gatheredis_mpi_rootis_mpi_scatteredLoad class in numpy binary format from disk.
If different formats are possible, this method should between them based on file name extension.
log_criticallog_debuglog_errorlog_infolog_warningPlot covariance matrix.
Save class to disk.
If different formats are possible, this method should between them based on file name extension.
Save figure to
filename.Update attibutes with those in
kwargs.Attributes
loggerMPI attributes
mpicommmpirootmpistate- copy()¶
Return shallow copy of
self.
- classmethod from_state(state, mpiroot=0, mpicomm=None)¶
Instantiate and initalize class with state dictionary.
- get(name, value=None, default=None)¶
Return
valueif notNone, else attributenameif notNone, elsedefault.- Parameters
name (string) – Attribute name. If
None, defaults todefault.value (object, default=None) – Value. If
None, returns attributename.default (object, default=None) – Default value.
- get_list(name, value=None, default=None)¶
Same as
get(), but ensuring returned value is a list. Default length (seemake_list()) is taken asdefaultlength.
- get_mat(covariance)¶
Return covariance array, without view.
- get_styles(covariance=None)¶
Return styles for input covariance.
- classmethod load(filename, mpiroot=0, mpicomm=None)¶
Load class in numpy binary format from disk. If the loaded state contains
__class__and that exists incls._registry, return instance ofcls._registry[__class__](instead ofcls).
- load_auto(*args, **kwargs)¶
If different formats are possible, this method should between them based on file name extension.
- property mpiattrs¶
MPI attributes
- plot(covariance=None, filename=None)¶
Plot covariance matrix.
- Parameters
covariance (CovarianceMatrix, default=None) – Covariance matrix to plot. If
None,covarianceattribute is used.filename (string, default=None) – If not
None, file name where to save figure.
- Returns
fig (matplotlib.figure.Figure) – Figure.
lax (array) – Array of axes.
cbar_ax (matplotlib.axes.Axes) – Color bar axes.
- save(filename)¶
Save class to disk.
- save_auto(*args, **kwargs)¶
If different formats are possible, this method should between them based on file name extension.
- savefig(filename, fig=None)¶
Save figure to
filename.- Parameters
filename (string) – Path where to save figure.
fig (matplotlib.figure.Figure, default=None) – Figure to save. Defaults to current figure.
- update(**kwargs)¶
Update attibutes with those in
kwargs.