plots.sources.single ==================== .. py:module:: plots.sources.single Classes ------- .. autoapisummary:: plots.sources.single.SingleSource Module Contents --------------- .. py:class:: SingleSource(*args, data=None, x=None, y=None, z=None, u=None, v=None, crs=None, style=None, regrid=False, **kwargs) A single source of data for a plot. :param data: The data to be plotted. :type data: numpy.ndarray or earthkit.data.core.Base or xarray.DataArray :param x: The x-coordinates of the data. If a string, it is assumed to be the name of the x-coordinate variable in data. :type x: numpy.ndarray or str, optional :param y: The y-coordinates of the data. If a string, it is assumed to be the name of the y-coordinate variable in data. :type y: numpy.ndarray or str, optional :param z: The z-coordinates of the data. If a string, it is assumed to be the name of the z-coordinate variable in data. :type z: numpy.ndarray or str, optional :param u: The u-component of the data. If a string, it is assumed to be the name of the u-component variable in data. :type u: numpy.ndarray or str, optional :param v: The v-component of the data. If a string, it is assumed to be the name of the v-component variable in data. :type v: numpy.ndarray or str, optional :param crs: The CRS of the data. :type crs: cartopy.crs.CRS, optional :param regrid: Whether to regrid the data. :type regrid: bool, optional :param \*\*kwargs: Metadata keys and values to attach to this Source. .. py:property:: coordinate_axis The coordinate axis of the data, either "x" or "y". .. py:property:: crs The CRS of the data. .. py:property:: data Return the underlying (original) data. .. py:method:: extract_x() Extract the x values of the data. .. py:method:: extract_xyz() Determine the x, y and z values of the data. .. py:method:: extract_y() Extract the y values of the data. .. py:method:: extract_z() Extract the z values of the data. .. py:property:: gridspec The gridspec of the data. The gridspec is used to determine the grid type of the data, which is required for regridding more complex grid types like reduced Gaussian grids. .. py:method:: guess_xyz() Decorator to guess the x, y and z values of the data. .. py:method:: metadata(key, default=None) Extract metadata from the data. :param key: The metadata key to extract. :type key: str :param default: The default value to return if the key is not found. :type default: any, optional .. py:attribute:: regrid .. py:attribute:: style .. py:method:: to_earthkit() Convert the data to an earthkit.data.core.Base object. .. py:property:: units The units of the data. .. py:property:: values The values of the data. .. py:property:: x_values The x values of the data. .. py:property:: y_values The y values of the data. .. py:property:: z_values The z values of the data.