plots.styles.auto
Functions
|
Guess the style to be applied to the data based on its metadata. |
Module Contents
- plots.styles.auto.guess_style(data, units=None, **kwargs)
Guess the style to be applied to the data based on its metadata.
The style is guessed by comparing the metadata of the data to the identities and styles in the style library. The first identity that matches the metadata is used to select the style. If the style library is not set or no identity matches the metadata, the default style is returned.
- Parameters:
data (earthkit.plots.sources.Source) – The data object containing the metadata.
units (str, optional) – The target units of the plot. If these do not match the units of the data, the data will be converted to the target units and the style will be adjusted accordingly.