Visualisation Module

baconian.common.plotter

class baconian.common.plotter.Plotter
color_list = ['b', 'r', 'g', 'm', 'y', 'k', 'cyan', 'plum', 'darkgreen', 'darkorange', 'oldlace', 'chocolate', 'purple', 'lightskyblue', 'gray', 'seagreen', 'antiquewhite', 'snow', 'darkviolet', 'brown', 'skyblue', 'mediumaquamarine', 'midnightblue', 'darkturquoise', 'sienna', 'lightsteelblue', 'gold', 'teal', 'blueviolet', 'mistyrose', 'seashell', 'goldenrod', 'forestgreen', 'aquamarine', 'linen', 'deeppink', 'darkslategray', 'mediumseagreen', 'dimgray', 'mediumpurple', 'lightgray', 'khaki', 'dodgerblue', 'papayawhip', 'salmon', 'floralwhite', 'lightpink', 'gainsboro', 'coral', 'indigo', 'darksalmon', 'royalblue', 'navy', 'orangered', 'cadetblue', 'orchid', 'palegreen', 'magenta', 'honeydew', 'darkgray', 'palegoldenrod', 'springgreen', 'lawngreen', 'palevioletred', 'olive', 'red', 'lime', 'yellowgreen', 'aliceblue', 'orange', 'chartreuse', 'lavender', 'paleturquoise', 'blue', 'azure', 'yellow', 'aqua', 'mediumspringgreen', 'cornsilk', 'lightblue', 'steelblue', 'violet', 'sandybrown', 'wheat', 'greenyellow', 'darkred', 'mediumslateblue', 'lightseagreen', 'darkblue', 'moccasin', 'lightyellow', 'turquoise', 'tan', 'mediumvioletred', 'mediumturquoise', 'limegreen', 'slategray', 'lightslategray', 'mintcream', 'darkgreen', 'white', 'mediumorchid', 'firebrick', 'bisque', 'darkcyan', 'ghostwhite', 'powderblue', 'tomato', 'lavenderblush', 'darkorchid', 'cornflowerblue', 'plum', 'ivory', 'darkgoldenrod', 'green', 'burlywood', 'hotpink', 'cyan', 'silver', 'peru', 'thistle', 'indianred', 'olivedrab', 'lightgoldenrodyellow', 'maroon', 'black', 'crimson', 'darkolivegreen', 'lightgreen', 'darkseagreen', 'lightcyan', 'saddlebrown', 'deepskyblue', 'slateblue', 'whitesmoke', 'pink', 'darkmagenta', 'darkkhaki', 'mediumblue', 'beige', 'blanchedalmond', 'lightsalmon', 'lemonchiffon', 'navajowhite', 'darkslateblue', 'lightcoral', 'rosybrown', 'fuchsia', 'peachpuff']
markers = ('+', 'x', 'v', 'o', '^', '<', '>', 's', 'p', '*', 'h', 'H', 'D', 'd', 'P', 'X')
static plot_any_key_in_log(data, key, index, exp_num=1, sub_log_dir_name=None, scatter_flag=False, histogram_flag=False, save_flag=False, save_path=None, save_format='png', file_name=None, separate_exp_flag=True, mean_stddev_flag=False, path_list=None)
Parameters:
  • data – a pandas DataFrame containing (index and) key columns
  • key – in y-axis, the variable to plot, assigned by user
  • index – in x-axis, the argument assigned by user
  • sub_log_dir_name – the sub-directory which the log file to plot is saved in
  • exp_num – [optional] the number of experiments to visualize
  • scatter_flag – [optional] draw scatter plot if true
  • histogram_flag – [optional] draw histogram if true
  • save_flag – [optional] save the figure to a file if true
  • save_path – [optional] save path of figure, assigned by user, the directory of log_path by default
  • save_format – [optional] format of figure to save, png by default
  • file_name – [optional] the file name of the file to save, key_VERUS_index by default
  • separate_exp_flag – [optional] plot the results of each experiment separately if true
  • mean_stddev_flag – [optional] plot the mean value of multiple experiment results and standard deviation
  • path_list – [optional] the list of save paths assigned by users, figure file will be saved to each path
Returns:

static plot_any_scatter_in_log(res_dict, res_name, file_name, key, index, op, scatter_flag=False, save_flag=False, save_path=None, fig_id=4, label='', restrict_dict=None)
plot_fig(fig_num, col_id, x, y, title, x_label, y_label, label=' ', marker='*')