gerg_plotting.data_classes.variable#
Module Contents#
- class gerg_plotting.data_classes.variable.Variable#
A class representing a scientific variable with its values and visualization properties.
This class handles values arrays along with their metadata and visualization settings, providing methods for values access and label generation.
Parameters#
- valuesnp.ndarray
The numerical values for the variable
- namestr
Name identifier for the variable
- cmapColormap, optional
Matplotlib colormap for visualization
- unitsstr, optional
Units of measurement
- vminfloat, optional
Minimum value for visualization scaling
- vmaxfloat, optional
Maximum value for visualization scaling
- labelstr, optional
Custom label for plotting
Attributes#
- valuesnp.ndarray
Flat numpy array containing the variable values
- namestr
Variable name identifier
- cmapColormap
Colormap for visualization
- unitsstr
Units of measurement
- vminfloat
Minimum value for visualization
- vmaxfloat
Maximum value for visualization
- labelstr
Display label for plots
- property attrs: list#
List of all attributes for the variable.
- cmap: matplotlib.colors.Colormap#
- property label: str#
Formatted label including variable name and units if available.
- name: str#
- units: str#
- values: numpy.ndarray#
- property vmax: float#
Maximum value for visualization. Using 98th percentile for numeric data.
- property vmin: float#
Minimum value for visualization, using 2nd percentile for numeric data.