Skip to content

Commit

Permalink
refactor: only set cmap once
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrugman committed May 27, 2022
1 parent 8d363d5 commit 14aa226
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 4 additions & 4 deletions popmon/pipeline/report_pipelines.py
Expand Up @@ -71,7 +71,7 @@ def __init__(
report_filepath=None,
show_stats=None,
disable_heatmap=None,
cmap="autumn_r",
cmap=None,
**kwargs,
):
"""Example pipeline for comparing test data with itself (full test set)
Expand Down Expand Up @@ -136,7 +136,7 @@ def __init__(
report_filepath=None,
show_stats=None,
disable_heatmap=None,
cmap="autumn_r",
cmap=None,
**kwargs,
):
"""Example pipeline for comparing test data with other (full) external reference set
Expand Down Expand Up @@ -203,7 +203,7 @@ def __init__(
report_filepath=None,
show_stats=None,
disable_heatmap=None,
cmap="autumn_r",
cmap=None,
**kwargs,
):
"""Example pipeline for comparing test data with itself (rolling test set)
Expand Down Expand Up @@ -341,7 +341,7 @@ def __init__(
skip_last_n=0,
plot_hist_n=6,
disable_heatmap=None,
cmap="autumn_r",
cmap=None,
):
"""Initialize an instance of Report.
Expand Down
4 changes: 3 additions & 1 deletion popmon/visualization/histogram_section.py
Expand Up @@ -55,7 +55,7 @@ def __init__(
hist_name_starts_with="histogram",
description="",
disable_heatmap=None,
cmap=None,
cmap="autumn_r",
):
"""Initialize an instance of SectionGenerator.
Expand Down Expand Up @@ -83,6 +83,8 @@ def __init__(
self.hist_name_starts_with = hist_name_starts_with
self.description = description
self.disable_heatmap = disable_heatmap or []
if cmap is None:
cmap = "autumn_r"
self.cmap = cmap

def get_description(self):
Expand Down

0 comments on commit 14aa226

Please sign in to comment.