malet.plot#
Attributes#
Functions#
|
Retrieve and merge the plot configuration based on the provided mode and |
|
Some rules |
|
|
|
|
|
Module Contents#
- malet.plot.FLAGS#
- malet.plot.get_plot_config(plot_config: dict, plot_args: dict)[source]#
Retrieve and merge the plot configuration based on the provided mode and arguments.
- Parameters:
plot_config (dict) – A dictionary containing configuration settings for different plot modes. It should include a ‘default_style’ key for default configurations.
plot_args (dict) – A dictionary containing arguments for the plot, including a ‘mode’ key that specifies the desired plot mode.
- Returns:
A merged dictionary containing the final plot configuration.
- Return type:
dict
Notes
If the mode in plot_args does not contain a hyphen (‘-‘), it is treated as an alias mode. In this case, the function retrieves the base configuration for the alias mode, merges it with plot_args and the default style, and then merges it with the alias-specific configuration.
If the mode contains a hyphen, the function directly merges plot_args with the mode-specific configuration.
- malet.plot.draw_metric(tsv_file, plot_config, save_name='', preprcs_df=lambda *x: ...)[source]#
Some rules step:
Step in [filter] and [best_ref_x_fields] (when step is in x_fields) can have special values {‘last’, ‘best’}
if step is not in x_fields and filter, the last step is chosen
if step is in filter, best_ref_x_fields is automatically set to the last step
- metric:
(if metric is in multi_line_fields, best_ref_metric_field is automatically set to the best metric)