bluemath_tk.core.plotting package

Submodules

bluemath_tk.core.plotting.base_plotting module

class bluemath_tk.core.plotting.base_plotting.BasePlotting[source]

Bases: ABC

Abstract base class for handling default plotting functionalities across the project.

get_list_of_colors_for_colormap(cmap: str | Colormap, num_colors: int) list[source]

Get a list of colors from a colormap.

Parameters:
  • cmap (str or Colormap) – The colormap to use.

  • num_colors (int) – The number of colors to generate.

Returns:

A list of colors generated from the colormap.

Return type:

list

abstractmethod plot_line(x, y)[source]

Abstract method for plotting a line. Should be implemented by subclasses.

abstractmethod plot_map(markers=None)[source]

Abstract method for plotting a map. Should be implemented by subclasses.

abstractmethod plot_scatter(x, y)[source]

Abstract method for plotting a scatter plot. Should be implemented by subclasses.

class bluemath_tk.core.plotting.base_plotting.DefaultInteractivePlotting[source]

Bases: BasePlotting

Concrete implementation of BasePlotting with interactive plotting behaviors.

plot_line(x, y)[source]

Abstract method for plotting a line. Should be implemented by subclasses.

plot_map(markers=None)[source]

Abstract method for plotting a map. Should be implemented by subclasses.

plot_scatter(x, y)[source]

Abstract method for plotting a scatter plot. Should be implemented by subclasses.

class bluemath_tk.core.plotting.base_plotting.DefaultStaticPlotting(template: str = 'default')[source]

Bases: BasePlotting

Concrete implementation of BasePlotting with static plotting behaviors.

get_subplot(figsize, **kwargs)[source]
get_subplots(**kwargs)[source]
plot_line(ax, **kwargs)[source]

Abstract method for plotting a line. Should be implemented by subclasses.

plot_map(ax, **kwargs)[source]

Abstract method for plotting a map. Should be implemented by subclasses.

plot_pie(ax, **kwargs)[source]
plot_scatter(ax, **kwargs)[source]

Abstract method for plotting a scatter plot. Should be implemented by subclasses.

set_grid(ax, grid=True)[source]

Sets the grid for a given axis.

set_title(ax, title='Plot Title')[source]

Sets the title for a given axis.

set_xlabel(ax, xlabel='X-axis')[source]

Sets the x-axis label for a given axis.

set_xlim(ax, xmin, xmax)[source]

Sets the x-axis limits for a given axis.

set_ylabel(ax, ylabel='Y-axis')[source]

Sets the y-axis label for a given axis.

set_ylim(ax, ymin, ymax)[source]

Sets the y-axis limits for a given axis.

templates = {'default': {'line': {'color': 'blue', 'line_style': '-'}, 'scatter': {'color': 'red', 'marker': 'o', 'size': 10}}}

bluemath_tk.core.plotting.colors module

bluemath_tk.core.plotting.colors.GetFamsColors(num_fams)[source]

Choose colors or Interpolate custom colormap to number of waves families

bluemath_tk.core.plotting.colors.colormap_bathy(topat, topag)[source]

returns custom colormap for bathymetry plot

bluemath_tk.core.plotting.colors.colormap_spectra()[source]
bluemath_tk.core.plotting.colors.colors_awt()[source]
bluemath_tk.core.plotting.colors.colors_dwt(num_clusters)[source]
bluemath_tk.core.plotting.colors.colors_fams_3()[source]

custom colors for 3 waves families

bluemath_tk.core.plotting.colors.colors_interp(num_clusters)[source]
bluemath_tk.core.plotting.colors.colors_mjo()[source]

custom colors for MJO 25 categories

bluemath_tk.core.plotting.colors.get_cluster_colors(num_clusters)[source]

Choose colors or Interpolate custom colormap to number of clusters

bluemath_tk.core.plotting.colors.get_config_variables()[source]

Module contents