gerg_plotting.data_classes.variable =================================== .. py:module:: gerg_plotting.data_classes.variable Module Contents --------------- .. py:class:: 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 ---------- values : np.ndarray The numerical values for the variable name : str Name identifier for the variable cmap : Colormap, optional Matplotlib colormap for visualization units : str, optional Units of measurement vmin : float, optional Minimum value for visualization scaling vmax : float, optional Maximum value for visualization scaling label : str, optional Custom label for plotting Attributes ---------- values : np.ndarray Flat numpy array containing the variable values name : str Variable name identifier cmap : Colormap Colormap for visualization units : str Units of measurement vmin : float Minimum value for visualization vmax : float Maximum value for visualization label : str Display label for plots .. py:property:: attrs :type: list List of all attributes for the variable. .. py:attribute:: cmap :type: matplotlib.colors.Colormap .. py:method:: get_attrs() -> list Get list of all attributes for the variable. Returns ------- list List of attribute names .. py:property:: label :type: str Formatted label including variable name and units if available. .. py:attribute:: name :type: str .. py:attribute:: units :type: str .. py:attribute:: values :type: numpy.ndarray .. py:property:: vmax :type: float Maximum value for visualization. Using 98th percentile for numeric data. .. py:property:: vmin :type: float Minimum value for visualization, using 2nd percentile for numeric data.