plotting#
Base classes for different types of plotting tasks.
Classes:
|
Base class for all plotting tasks. |
|
Base class for plotting tasks creating 1-dimensional plots. |
|
Base class for plotting tasks creating 2-dimensional plots. |
|
Mixin class for tasks creating plots where contributions of different processes are shown. |
|
Mixin class for tasks creating plots for multiple variables. |
- class PlotBase(*args, **kwargs)[source]#
Bases:
ConfigTaskBase class for all plotting tasks.
Attributes:
Methods:
resolve_param_values(params)- rtype:
Returns a sorted, insertable dictionary containing all parts that make up the name of a plot file.
get_plot_names(name)Returns a list of basenames for created plots given a file name for all configured file types, plus the additional plot suffix.
get_plot_func(func_name)Returns a function, imported from a module given func_name which should have the format
<module_to_import>.<function_name>.call_plot_func(func_name, **kwargs)Gets the plot function referred to by func_name via
get_plot_func(), calls it with all kwargs and returns its result.update_plot_kwargs(kwargs)Hook to update keyword arguments kwargs used for plotting in
call_plot_func().- plot_function = <luigi.parameter.Parameter object>#
- file_types = <law.parameter.CSVParameter object>#
- plot_suffix = <luigi.parameter.Parameter object>#
- view_cmd = <luigi.parameter.Parameter object>#
- general_settings = <columnflow.tasks.framework.parameters.SettingsParameter object>#
- custom_style_config = <luigi.parameter.Parameter object>#
- skip_legend = <law.parameter.OptionalBoolParameter object>#
- cms_label = <luigi.parameter.Parameter object>#
- debug_plot = <luigi.parameter.BoolParameter object>#
- blinding_threshold = <luigi.parameter.FloatParameter object>#
- exclude_params_remote_workflow = {'debug_plot'}#
- plot_parts()[source]#
Returns a sorted, insertable dictionary containing all parts that make up the name of a plot file.
- Return type:
InsertableDict
- get_plot_names(name)[source]#
Returns a list of basenames for created plots given a file name for all configured file types, plus the additional plot suffix.
- get_plot_func(func_name)[source]#
Returns a function, imported from a module given func_name which should have the format
<module_to_import>.<function_name>.- Return type:
- call_plot_func(func_name, **kwargs)[source]#
Gets the plot function referred to by func_name via
get_plot_func(), calls it with all kwargs and returns its result. kwargs are updated through theupdate_plot_kwargs()hook first.Also, when the
debug_plotparameter is set to True, an ipython debugger is started after the plot is created and can be interactively debugged.- Return type:
- update_plot_kwargs(kwargs)[source]#
Hook to update keyword arguments kwargs used for plotting in
call_plot_func().- Return type:
- exclude_index = False#
- exclude_params_branch = {'user'}#
- exclude_params_index = {'user'}#
- exclude_params_repr = {'notify_custom', 'notify_mattermost', 'notify_slack', 'user'}#
- exclude_params_repr_empty = {}#
- exclude_params_req = {'notify_custom', 'notify_mattermost', 'notify_slack', 'user'}#
- exclude_params_req_get = {}#
- exclude_params_req_set = {}#
- exclude_params_sandbox = {'log_file', 'sandbox'}#
- exclude_params_workflow = {'notify_custom', 'notify_mattermost', 'notify_slack', 'user'}#
- class PlotBase1D(*args, **kwargs)[source]#
Bases:
PlotBaseBase class for plotting tasks creating 1-dimensional plots.
Attributes:
Methods:
- rtype:
- skip_ratio = <law.parameter.OptionalBoolParameter object>#
- density = <law.parameter.OptionalBoolParameter object>#
- yscale = <luigi.parameter.ChoiceParameter object>#
- shape_norm = <law.parameter.OptionalBoolParameter object>#
- hide_errors = <law.parameter.OptionalBoolParameter object>#
- exclude_index = False#
- exclude_params_branch = {'user'}#
- exclude_params_index = {'user'}#
- exclude_params_remote_workflow = {'debug_plot'}#
- exclude_params_repr = {'notify_custom', 'notify_mattermost', 'notify_slack', 'user'}#
- exclude_params_repr_empty = {}#
- exclude_params_req = {'notify_custom', 'notify_mattermost', 'notify_slack', 'user'}#
- exclude_params_req_get = {}#
- exclude_params_req_set = {}#
- exclude_params_sandbox = {'log_file', 'sandbox'}#
- exclude_params_workflow = {'notify_custom', 'notify_mattermost', 'notify_slack', 'user'}#
- class PlotBase2D(*args, **kwargs)[source]#
Bases:
PlotBaseBase class for plotting tasks creating 2-dimensional plots.
Attributes:
Methods:
modify_param_values(params)Hook to modify command line arguments before instances of this class are created.
- rtype:
- zscale = <luigi.parameter.ChoiceParameter object>#
- density = <law.parameter.OptionalBoolParameter object>#
- shape_norm = <law.parameter.OptionalBoolParameter object>#
- colormap = <luigi.parameter.Parameter object>#
- zlim = <law.parameter.CSVParameter object>#
- extremes = <luigi.parameter.ChoiceParameter object>#
- extreme_colors = <law.parameter.CSVParameter object>#
- classmethod modify_param_values(params)[source]#
Hook to modify command line arguments before instances of this class are created.
- Return type:
- exclude_index = False#
- exclude_params_branch = {'user'}#
- exclude_params_index = {'user'}#
- exclude_params_remote_workflow = {'debug_plot'}#
- exclude_params_repr = {'notify_custom', 'notify_mattermost', 'notify_slack', 'user'}#
- exclude_params_repr_empty = {}#
- exclude_params_req = {'notify_custom', 'notify_mattermost', 'notify_slack', 'user'}#
- exclude_params_req_get = {}#
- exclude_params_req_set = {}#
- exclude_params_sandbox = {'log_file', 'sandbox'}#
- exclude_params_workflow = {'notify_custom', 'notify_mattermost', 'notify_slack', 'user'}#
- class ProcessPlotSettingMixin(*args, **kwargs)[source]#
Bases:
DatasetsProcessesMixin,PlotBaseMixin class for tasks creating plots where contributions of different processes are shown.
Attributes:
Methods:
resolve_param_values(params)- rtype:
- process_settings = <columnflow.tasks.framework.parameters.MultiSettingsParameter object>#
- exclude_index = False#
- exclude_params_branch = {'user'}#
- exclude_params_index = {'user'}#
- exclude_params_remote_workflow = {'debug_plot'}#
- exclude_params_repr = {'notify_custom', 'notify_mattermost', 'notify_slack', 'user'}#
- exclude_params_repr_empty = {}#
- exclude_params_req = {'notify_custom', 'notify_mattermost', 'notify_slack', 'user'}#
- exclude_params_req_get = {}#
- exclude_params_req_set = {}#
- exclude_params_sandbox = {'log_file', 'sandbox'}#
- exclude_params_workflow = {'notify_custom', 'notify_mattermost', 'notify_slack', 'user'}#
- class VariablePlotSettingMixin(*args, **kwargs)[source]#
Bases:
VariablesMixin,PlotBaseMixin class for tasks creating plots for multiple variables.
Attributes:
Methods:
resolve_param_values(params)- rtype:
- variable_settings = <columnflow.tasks.framework.parameters.MultiSettingsParameter object>#
- exclude_index = False#
- exclude_params_branch = {'user'}#
- exclude_params_index = {'user'}#
- exclude_params_remote_workflow = {'debug_plot'}#
- exclude_params_repr = {'notify_custom', 'notify_mattermost', 'notify_slack', 'user'}#
- exclude_params_repr_empty = {}#
- exclude_params_req = {'notify_custom', 'notify_mattermost', 'notify_slack', 'user'}#
- exclude_params_req_get = {}#
- exclude_params_req_set = {}#
- exclude_params_sandbox = {'log_file', 'sandbox'}#
- exclude_params_workflow = {'notify_custom', 'notify_mattermost', 'notify_slack', 'user'}#