cgeniepy.plot#

Classes#

GriddedDataVis

A class to visualise the GriddedData object

ScatterDataVis

Visualisation object based on ScatterData object

CommunityPalette

A class to handle community-driven colormaps

Functions#

add_zebra_frame(ax[, lw])

copied from SciTools/cartopy#1830

add_border_ticks(ax[, tick_len_scale])

copied from SciTools/cartopy#2003

Module Contents#

class cgeniepy.plot.GriddedDataVis(gd)#

A class to visualise the GriddedData object

transform_crs#
data#
attrs#
has_negative_and_positive#
aes_dict#
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

class cgeniepy.plot.ScatterDataVis(sd)#

Visualisation object based on ScatterData object

data#
index#
plot(var, *args, **kwargs)#

visualise the data based on the dimension of the data

class cgeniepy.plot.CommunityPalette(name=None, *args, **kwargs)#

A class to handle community-driven colormaps

name = None#
get_palette(cmap_name, N=256, reverse=False, alpha=None)#

community-driven colormaps with multiple sources

Parameters:

cmap_name (str) – colormap name, can be found in avail_palette()

Returns:

colormap

XML data: https://sciviscolor.org/colormaps/ txt data: from original packages

avail_palettes(show_ferret_data=True)#

return a list of colormap names

to_rgb()#
to_hex(unique=True)#
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.

__repr__()#
cgeniepy.plot.add_zebra_frame(ax, lw=1.2)#

copied from SciTools/cartopy#1830

cgeniepy.plot.add_border_ticks(ax, tick_len_scale=0.015)#

copied from SciTools/cartopy#2003