plotter package#
Submodules#
plotter.plotter2D module#
- class plotter.plotter2D.Plotter2D(param_data: list, param_name: str, objective_data: list, objective_name: list, y_label='value', spec_val=[], spec_val_name='')#
Bases:
object
Creates a Plotter2D object: - param_data (list) : parametric Data, will be plotted on the x-axis with label param_name - objective_data (list) : multiple curves, each stored by y-values in the form of a objective_data[i] = list[len(param_data)], will be labelled with respective objective_name[i] - spec_val (list) : special values will be plotted in red and labelled spec_val_name
- Parameters:
para_data (list) – list of x-values
objective_data (list) – list of y-values, can represent multiplce curves
param_name (str) – name of the x-axis
objective_name (list) – name of the curves
y_label (str) – label of the y-axis
spec_val (list, optional) – special values, defaults to []
spec_val_name (str, optional) – name of the special values, defaults to “”
- Return type:
None
- plot_normal(name: str, show_min=False, show_max=False, cmap=None, save=False, ignore_neg_value=True, max_val=None)#
Shows the plot with the data stored in member variables. Ignore_neg_value is set to True by default, which means that negative values are ignored. This is done to not plot None values, as they were replaced with negative values.
- Parameters:
name (str) – name of the plot
show_min (bool, optional) – show minimum value, defaults to False
show_max (bool, optional) – show maximum value, defaults to False
cmap (str, optional) – color map, defaults to None
save (bool, optional) – save plot, defaults to False
ignore_neg_value (bool, optional) – ignore negative values, defaults to True
max_val ([type], optional) – maximum value on x-axis, defaults to None
- Return type:
None
plotter.plotter3D module#
- class plotter.plotter3D.Plotter3D(param_x_data: list, param_x_name: str, param_y_data: list, param_y_name: str, objective_data: list, objective_name: str)#
Bases:
object
Creates a Plotter3D object:
param_x_data
(list): parametric Data, will be plotted on the x-axis with label param_x_nameparam_y_data
(list): parametric Data, will be plotted on the y-axis with label param_y_nameobjective_data
(list): z-values of the graph in the form of a matrix m[len(param_x_data)][len(param_y_data)], will be labelled with objective_name
- Parameters:
param_x_data (list) – list of x-values
param_x_name (str) – name of the x-axis
param_y_data (list) – list of y-values
param_y_name (str) – name of the y-axis
objective_data (list) – z-values of the graph in the form of a matrix
objective_name (str) – name of the z-axis
- Return type:
None
- plot_normal(name: str, show_min=False, show_max=False, save=False, interpolation='bilinear')#
Shows the plot with the data stored in member variables:
name (str) : sets the title of the plot
show_min (bool) : if True, plots and computes minimum z-value and it’s corresponding x- and y-coordinate
show_max (bool) : if True, plots and computes maximum z-value and it’s corresponding x- and y-coordinate
- save (bool)if True, saves plot directly in plots folder with naming “name+HH_MM_SS.png”,
where
HH,MM,SS
are hours, minutes and seconds respectively
- interpolation (str)chooses interpolation mode, options are:
'none', 'nearest', 'bilinear', 'bicubic', 'spline16', 'spline36', 'hanning', 'hamming', 'hermite', 'kaiser', 'quadric', 'catrom', 'gaussian', 'bessel', 'mitchell', 'sinc', 'lanczos'
- Parameters:
name (str) – name of the plot
show_min (bool, optional) – show minimum value, defaults to False
show_max (bool, optional) – show maximum value, defaults to False
save (bool, optional) – save plot, defaults to False
interpolation (str, optional) – interpolation mode, defaults to ‘bilinear’
- Return type:
None