cgeniepy.plot ============= .. py:module:: cgeniepy.plot Classes ------- .. autoapisummary:: cgeniepy.plot.GriddedDataVis cgeniepy.plot.ScatterDataVis cgeniepy.plot.CommunityPalette Functions --------- .. autoapisummary:: cgeniepy.plot.add_zebra_frame cgeniepy.plot.add_border_ticks Module Contents --------------- .. py:class:: GriddedDataVis(gd) A class to visualise the GriddedData object .. py:attribute:: transform_crs .. py:attribute:: data .. py:attribute:: attrs .. py:attribute:: has_negative_and_positive .. py:attribute:: aes_dict .. py:method:: plot(*args, **kwargs) visualise the data based on the dimension of the array *args and **kwargs are passed to plotting functions in practical, turn on/off the plotting elements e.g., plot(x, y, pcolormesh=False, contour=True) each plotting function will seek for the corresponding kwargs in self.aes_dict .. py:class:: ScatterDataVis(sd) Visualisation object based on ScatterData object .. py:attribute:: data .. py:attribute:: index .. py:method:: plot(var, *args, **kwargs) visualise the data based on the dimension of the data .. py:class:: CommunityPalette(name=None, *args, **kwargs) A class to handle community-driven colormaps .. py:attribute:: name :value: None .. py:method:: get_palette(cmap_name, N=256, reverse=False, alpha=None) community-driven colormaps with multiple sources :param cmap_name: colormap name, can be found in avail_palette() :type cmap_name: str :returns: colormap XML data: https://sciviscolor.org/colormaps/ txt data: from original packages .. py:method:: avail_palettes(show_ferret_data=True) return a list of colormap names .. py:method:: to_rgb() .. py:method:: to_hex(unique=True) .. py:method:: create_colormap(positions, colors) Create a colormap with specified positions and colors. Args: positions (list): List of floats indicating the positions of colors in the colormap. colors (list): List of RGB tuples representing the colors. Returns: LinearSegmentedColormap: The created colormap. .. py:method:: __repr__() .. py:function:: add_zebra_frame(ax, lw=1.2) copied from https://github.com/SciTools/cartopy/issues/1830 .. py:function:: add_border_ticks(ax, tick_len_scale=0.015) copied from https://github.com/SciTools/cartopy/issues/2003