hari_plotter.plot module

class hari_plotter.plot.Plot[source]

Bases: ABC

classmethod from_qt(qt_settings: dict)[source]
get_dynamic_plot_requests()[source]
get_limits(axis_limits: dict) list[tuple[float | None]][source]
get_static_plot_requests()[source]
get_track_clusterings_requests() list[dict[str, Any]][source]
static is_available(interface: Interface) tuple[bool, str][source]

Returns True if available for this interface and comment why

is_single_color() bool[source]
plot_dependencies()[source]
static settings(interface: Interface)[source]
settings_to_code() str[source]
static tanh_axis_labels(ax: Axes, scale: list[str])[source]

Adjust axis labels for tanh scaling.

Parameters:

axplt.Axes

The Axes object to which the label adjustments should be applied.

scalelist[str]

Which axis to adjust. Choices: ‘x’, ‘y’, or ‘both’.

static transform_data(data_list, transform_parameter: str = 'Nodes')[source]
class hari_plotter.plot.plot_clustered_histogram(interface: Interface, color_scheme: ColorScheme, parameter: str, clustering_settings: dict | None = None, scale: None | tuple[str] = None, rotated: bool | None = False, show_x_label: bool = True, show_y_label: bool = True, exclude_types: tuple[str] = (), x_lim: Sequence[float] | None = None, y_lim: Sequence[float] | None = None, fill_color: str | dict | float | None = None)[source]

Bases: Plot

get_dynamic_plot_requests()[source]
get_track_clusterings_requests()[source]
plot(ax: Axes, group_number: int, axis_limits: dict)[source]
static qt_to_settings(qt_settings: dict) dict[source]
static settings(interface: Interface) list[Parameter][source]
settings_to_code() str[source]
class hari_plotter.plot.plot_clustering_centroids(interface: Interface, color_scheme: ColorScheme, parameters: tuple[str], clustering_settings: dict, scale: None | tuple[str] = None, rotated: bool | None = False, show_x_label: bool = True, show_y_label: bool = True, x_lim: Sequence[float] | None = None, y_lim: Sequence[float] | None = None, color: str | None = None, marker: str | None = None)[source]

Bases: Plot

get_dynamic_plot_requests()[source]
get_track_clusterings_requests()[source]
plot(ax: Axes, group_number: int, axis_limits: dict)[source]

Plots the decision boundaries for a 2D slice of the clustering object’s data.

Args: - x_feature_index (int): The index of the feature to be plotted on the x-axis. - y_feature_index (int): The index of the feature to be plotted on the y-axis. - plot_limits (tuple): A tuple containing the limits of the plot: (x_min, x_max, y_min, y_max). - resolution (int): The number of points to generate in the mesh for the plot.

Returns: None

class hari_plotter.plot.plot_clustering_degree_of_membership(interface: Interface, color_scheme: ColorScheme, parameters: tuple[str], clustering_settings: dict = {}, scale: None | tuple[str] = None, show_x_label: bool = True, show_y_label: bool = True, x_lim: Sequence[float] | None = None, y_lim: Sequence[float] | None = None, colormap=None, alpha: float = 0.2, resolution: int = 100)[source]

Bases: Plot

get_dynamic_plot_requests()[source]
get_track_clusterings_requests()[source]
plot(ax: Axes, group_number: int, axis_limits: dict)[source]
class hari_plotter.plot.plot_clustering_density(interface: Interface, color_scheme: ColorScheme, parameters: tuple[str], clustering_settings: dict = {}, scale: None | tuple[str] = None, show_x_label: bool = True, show_y_label: bool = True, x_lim: Sequence[float] | None = None, y_lim: Sequence[float] | None = None, fill_color: dict | None = None, alpha: float = 0.5, levels: int = 5, thresh: float = 0.5, resolution: int = 100)[source]

Bases: Plot

get_dynamic_plot_requests()[source]
get_track_clusterings_requests()[source]
plot(ax: Axes, group_number: int, axis_limits: dict)[source]
class hari_plotter.plot.plot_clustering_fill(interface: Interface, color_scheme: ColorScheme, parameters: tuple[str], clustering_settings: dict = {}, scale: None | tuple[str] = None, show_x_label: bool = True, show_y_label: bool = True, x_lim: Sequence[float] | None = None, y_lim: Sequence[float] | None = None, fill_color: dict | None = None, alpha: float = 0.2, resolution: int = 100)[source]

Bases: Plot

get_dynamic_plot_requests()[source]
get_track_clusterings_requests()[source]
plot(ax: Axes, group_number: int, axis_limits: dict)[source]
class hari_plotter.plot.plot_clustering_line(interface: Interface, color_scheme: ColorScheme, parameter: str, clustering_settings: dict = {}, scale: None | tuple[str] = None, show_x_label: bool = True, show_y_label: bool = True, x_lim: Sequence[float] | None = None, y_lim: Sequence[float] | None = None, color: dict | None = None, linestyle: str | None = None, show_legend: bool = True)[source]

Bases: Plot

data()[source]
get_static_plot_requests()[source]
get_track_clusterings_requests()[source]
plot(ax: Axes, group_number: int, axis_limits: dict)[source]
class hari_plotter.plot.plot_fill_between(interface: Interface, color_scheme: ColorScheme, parameters: tuple[str], functions: list[str] | None = None, scale: None | tuple[str] = None, show_x_label: bool = True, show_y_label: bool = True, x_lim: Sequence[float] | None = None, y_lim: Sequence[float] | None = None, color: dict | None = None)[source]

Bases: Plot

data(function_key)[source]
get_static_plot_requests()[source]
plot(ax: Axes, group_number: int, axis_limits: dict)[source]
class hari_plotter.plot.plot_fill_between_clustering(interface: Interface, color_scheme: ColorScheme, parameter: str, range_parameter: str, clustering_settings: dict = {}, scale: None | tuple[str] = None, show_x_label: bool = True, show_y_label: bool = True, x_lim: Sequence[float] | None = None, y_lim: Sequence[float] | None = None, color: dict | None = None, show_legend: bool = True, alpha: float = 0.3)[source]

Bases: Plot

data()[source]
get_static_plot_requests()[source]
get_track_clusterings_requests()[source]
plot(ax: Axes, group_number: int, axis_limits: dict)[source]
class hari_plotter.plot.plot_graph_line(interface: Interface, color_scheme: ColorScheme, parameters: tuple[str], scale: None | tuple[str] = None, show_x_label: bool = True, show_y_label: bool = True, x_lim: Sequence[float] | None = None, y_lim: Sequence[float] | None = None, function: str = 'Mean', color: dict | None = None, linestyle: str | None = None)[source]

Bases: Plot

data()[source]
get_static_plot_requests()[source]
get_track_clusterings_requests()[source]
plot(ax: Axes, group_number: int, axis_limits: dict)[source]
class hari_plotter.plot.plot_hexbin(interface: Interface, color_scheme: ColorScheme, parameters: tuple[str], scale: None | tuple[str] = None, rotated: bool | None = False, show_x_label: bool = True, show_y_label: bool = True, x_lim: Sequence[float] | None = None, y_lim: Sequence[float] | None = None, colormap: str | None = None, show_colorbar: bool = False)[source]

Bases: Plot

get_dynamic_plot_requests()[source]
get_track_clusterings_requests()[source]
plot(ax: Axes, group_number: int, axis_limits: dict)[source]

Plot a hexbin on the given ax with the provided x and y values.

Parameters:

axplt.Axes

Axes object where the hexbin will be plotted.

x_values, y_valueslist[float]

lists containing x-values and y-values

extentlist[float], optional

The bounding box in data coordinates that the hexbin should fill.

colormapstr, optional

The colormap to be used for hexbin coloring.

cmaxfloat, optional

The maximum number of counts in a hexbin for colormap scaling.

scalelist, optional

Scale for the plot values (x and y). Options: ‘Linear’ or ‘Tanh’. Default is ‘Linear’ for both.

show_colorbar : bool, optional

static qt_to_settings(qt_settings: dict) dict[source]
static settings(interface: Interface) list[Parameter][source]
settings_to_code() str[source]
class hari_plotter.plot.plot_histogram(interface: Interface, color_scheme: ColorScheme, parameter: str, scale: None | tuple[str] = None, rotated: bool | None = False, show_x_label: bool = True, show_y_label: bool = True, exclude_types: tuple[str] = (), x_lim: Sequence[float] | None = None, y_lim: Sequence[float] | None = None, histogram_color: str | dict | float | None = None)[source]

Bases: Plot

get_dynamic_plot_requests() list[dict][source]
get_track_clusterings_requests()[source]
plot(ax: Axes, group_number: int, axis_limits: dict)[source]

Plot a histogram on the given ax with the provided data data.

Parameters:

axplt.Axes

Axes object where the histogram will be plotted.

datalist[float]

list containing parameter values.

scalestr, optional

The scale for the x-axis. Options: ‘Linear’ or ‘Tanh’.

rotatedbool, optional

If True, the histogram is rotated to be horizontal.

x_limOptional[Sequence[float] | None]

Limits of the x-axis.

y_limOptional[Sequence[float] | None]

Limits of the y-axis.

static qt_to_settings(qt_settings: dict) dict[source]

Transforms dict of settings from PyQT GUI to the dict that will be used for class init.

static settings(interface: Interface) list[Parameter][source]
settings_to_code() str[source]
class hari_plotter.plot.plot_node_lines(interface: Interface, color_scheme: ColorScheme, parameters: tuple[str], scale: None | tuple[str] = None, exclude_types: tuple[str] = (), show_x_label: bool = True, show_y_label: bool = True, x_lim: Sequence[float] | None = None, y_lim: Sequence[float] | None = None, color: dict | None = None, linestyle: str | None = None)[source]

Bases: Plot

data()[source]
get_static_plot_requests()[source]
get_track_clusterings_requests()[source]
plot(ax: Axes, group_number: int, axis_limits: dict)[source]
class hari_plotter.plot.plot_scatter(interface: Interface, color_scheme: ColorScheme, parameters: tuple[str], scale: None | tuple[str] = None, rotated: bool | None = False, show_x_label: bool = True, show_y_label: bool = True, x_lim: Sequence[float] | None = None, y_lim: Sequence[float] | None = None, color: str | None = None, marker: str | None = None)[source]

Bases: Plot

get_dynamic_plot_requests()[source]
get_track_clusterings_requests()[source]
plot(ax: Axes, group_number: int, axis_limits: dict)[source]

Plot a scatter plot on the given ax with the provided x and y values.

Parameters:

axplt.Axes

Axes object where the scatter plot will be plotted.

datadefaultdict[list[float]]

A dictionary containing lists of x and y values.

parameterstuple[str]

A tuple containing the names of the parameters to be plotted.

x_lim, y_limOptional[Sequence[float]]

The limits for the x and y axes.

colorOptional[str]

The color of the markers.

markerstr

The shape of the marker.

show_x_label, show_y_labelbool

Flags to show or hide the x and y labels.

class hari_plotter.plot.plot_time_line(interface: Interface, color_scheme: ColorScheme, parameters: tuple[str], scale: None | tuple[str] = None, show_x_label: bool = True, show_y_label: bool = True, x_lim: Sequence[float] | None = None, y_lim: Sequence[float] | None = None, linestyle: str | None = None, color: str | None = None)[source]

Bases: Plot

get_dynamic_plot_requests()[source]
plot(ax: Axes, group_number: int, axis_limits: dict)[source]