layers ====== .. py:module:: layers Classes ------- .. autoapisummary:: layers.Layer layers.LayerGroup Module Contents --------------- .. py:class:: Layer(sources, mappable, subplot, style=None) A single plot Layer on a Subplot. :param source: The source of the data to be plotted. :type source: earthkit.maps.sources.Source :param mappable: The object that is plotted on the axes. :type mappable: matplotlib object :param subplot: The subplot on which this layer is plotted. :type subplot: earthkit.plots.components.subplots.Subplot :param style: The style to be applied to this layer. :type style: earthkit.plots.styles.Style, optional .. py:property:: ax The matplotlib axes on which this layer is plotted. .. py:property:: axes All matplotlib axes over which this layer is plotted. .. py:property:: fig The matplotlib figure on which this layer is plotted. .. py:method:: format_string(string) .. py:method:: legend(*args, **kwargs) Generate a legend for this specific layer. .. py:property:: magnitude .. py:attribute:: mappable .. py:attribute:: sources .. py:attribute:: style :value: None .. py:attribute:: subplot .. py:class:: LayerGroup(layers) A group of related layers. :param layers: A list of grouped layers. :type layers: list of earthkit.maps.charts.layers.Layer objects .. py:property:: axes All matplotlib axes over which this layer group is plotted. .. py:property:: fig The matplotlib figure on which this layer group is plotted. .. py:method:: format_string(string, unique=True) Format a string with the layer group's metadata. :param string: The string to be formatted. Can contain placeholders for the layer group's metadata in the form of `{key}`. :type string: str :param unique: Whether to return only unique values for each placeholder. If False, all values will be returned. :type unique: bool, optional .. py:attribute:: layers .. py:method:: legend(*args, **kwargs) Add a legend for this layer group. :param \*args: Arguments to be passed to the style.legend method. :type \*args: list :param \*\*kwargs: Keyword arguments to be passed to the style.legend method. :type \*\*kwargs: dict .. py:property:: mappable The object that is plotted on the axes. .. py:property:: style The style to be applied to this layer group. .. py:property:: subplots The subplots on which this layer group is plotted.