hal.charts package

Submodules

hal.charts.correlation module

Everything you need to create correlation charts

hal.charts.correlation.create_correlation_matrix_plot(correlation_matrix, title, feature_list)[source]

Creates plot for correlation matrix

Parameters:
  • correlation_matrix – Correlation matrix of features
  • title – Title of plot
  • feature_list – List of names of features
Returns:

Shows the given correlation matrix as image

hal.charts.models module

Chart model

class hal.charts.models.SimpleChart(title, grid=True)[source]

Bases: object

Simple matplotlib chart

create_bar_chart(x_labels, y_values, y_label)[source]

Creates bar char

Parameters:
  • x_labels – Names for each variable
  • y_values – Values of x labels
  • y_label – Label of y axis
Returns:

Bar chart

create_multiple_bar_chart(x_labels, mul_y_values, mul_y_labels, normalize=False)[source]

Creates bar chart with multiple lines

Parameters:
  • x_labels – Names for each variable
  • mul_y_values – list of values of x labels
  • mul_y_labels – list of labels for each y value
  • normalize – True iff you want to normalize each y series
Returns:

Bar chart

create_sym_log_bar_chart(x_labels, y_values, y_label)[source]

Creates bar chart (log version)

Parameters:
  • x_labels – Names for each variable
  • y_values – Values of x labels
  • y_label – Label of y axis
Returns:

Sym-log bar chart

get_ax()[source]

Adds to figure

Returns:operation completed successfully?
get_fig()[source]

Gets chart canvas

Returns:matplotlib figure
static setup(bottom)[source]

Setups bottom margin

Parameters:bottom – Bottom margin

hal.charts.plotter module

Show elegant plots in any dimension

class hal.charts.plotter.Plot2d[source]

Bases: hal.charts.plotter.Plotter

2d plot

param(functions, min_val, max_val, points)[source]

Plots parametric data

Parameters:
  • functions – functions to plot (x, y …)
  • min_val – minimum value
  • max_val – maximum value
  • points – number of points to display
plot(func, mins, maxs, points)[source]

Plots function

Parameters:
  • func – function to plot
  • mins – minimum of values (x, y …)
  • maxs – maximum of values (x, y …)
  • points – points in axis (x, y …)
scatter(vectors)[source]

Plots scatter data

Parameters:vectors – list of vectors (x, y, …)
class hal.charts.plotter.Plot3d[source]

Bases: hal.charts.plotter.Plotter

3D plot

param(functions, min_val, max_val, points)[source]

Plots parametric data

Parameters:
  • functions – functions to plot (x, y …)
  • min_val – minimum value
  • max_val – maximum value
  • points – number of points to display
plot(func, mins, maxs, points)[source]

Plots function

Parameters:
  • func – function to plot
  • mins – minimum of values (x, y …)
  • maxs – maximum of values (x, y …)
  • points – points in axis (x, y …)
scatter(vectors)[source]

Plots scatter data

Parameters:vectors – list of vectors (x, y, …)
class hal.charts.plotter.Plot4d[source]

Bases: hal.charts.plotter.Plotter

4D plot generator with slider

param = DeprecationWarning(<function Plot4d.param>,)
plot(func, mins, maxs, points=None)[source]

Plots function

Parameters:
  • func – function to plot
  • mins – minimum of values (x, y …)
  • maxs – maximum of values (x, y …)
  • points – points in axis (x, y …)
plot_type(func, mins, maxs, precision, kind)[source]

Plots function

Parameters:
  • func – function to plot
  • mins – minimum of values (x, y …)
  • maxs – maximum of values (x, y …)
  • precision – precision to plot
  • kind – kind of plot, “slice”, “countour”
scatter = DeprecationWarning(<function Plot4d.scatter>,)
class hal.charts.plotter.Plotter[source]

Bases: object

Plots something in N-dimensional space

param(functions, min_val, max_val, points)[source]

Plots parametric data

Parameters:
  • functions – functions to plot (x, y …)
  • min_val – minimum value
  • max_val – maximum value
  • points – number of points to display
plot(func, mins, maxs, points)[source]

Plots function

Parameters:
  • func – function to plot
  • mins – minimum of values (x, y …)
  • maxs – maximum of values (x, y …)
  • points – points in axis (x, y …)
scatter(vectors)[source]

Plots scatter data

Parameters:vectors – list of vectors (x, y, …)
static show_plot()[source]

Shows plot