From 460b32219821d528bcecdf21f2c12d111eadfffa Mon Sep 17 00:00:00 2001 From: Sam Van Stroud Date: Thu, 11 Jul 2024 14:32:25 +0100 Subject: [PATCH 1/4] no colourbar by default --- puma/matshow.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/puma/matshow.py b/puma/matshow.py index 13caa622..a0ffe3a8 100644 --- a/puma/matshow.py +++ b/puma/matshow.py @@ -21,7 +21,7 @@ def __init__( show_percentage: bool = False, text_color_threshold: float = 0.408, colormap: plt.cm = plt.cm.Oranges, - show_cbar: bool = True, + show_cbar: bool = False, cbar_label: str | None = None, **kwargs, ) -> None: From 9ccf71aec2e45f2af7e2a064588e750c8657eb6b Mon Sep 17 00:00:00 2001 From: Sam Van Stroud Date: Thu, 11 Jul 2024 14:32:31 +0100 Subject: [PATCH 2/4] better ylabel names --- puma/hlplots/aux_results.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/puma/hlplots/aux_results.py b/puma/hlplots/aux_results.py index fa8b0b9b..1501b334 100644 --- a/puma/hlplots/aux_results.py +++ b/puma/hlplots/aux_results.py @@ -262,36 +262,40 @@ def plot_var_vtx_perf( if isinstance(flavour, str): flav = Flavours[flavour] + # $n_{vtx}^{match}/n_{vtx}^{true}$ plot_vtx_eff = VarVsVtxPlot( mode="efficiency", - ylabel=r"$n_{vtx}^{match}/n_{vtx}^{true}$", + ylabel="Efficiency", xlabel=xlabel, logy=False, atlas_first_tag=self.atlas_first_tag, atlas_second_tag=atlas_second_tag + f", {flav.label}", y_scale=1.4, ) + # $n_{vtx}^{match}/n_{vtx}^{reco}$ plot_vtx_purity = VarVsVtxPlot( mode="purity", - ylabel=r"$n_{vtx}^{match}/n_{vtx}^{reco}$", + ylabel="Purity", xlabel=xlabel, logy=False, atlas_first_tag=self.atlas_first_tag, atlas_second_tag=atlas_second_tag + f", {flav.label}", y_scale=1.4, ) + # $n_{trk}^{match}/n_{trk}^{true}$ plot_vtx_trk_eff = VarVsVtxPlot( mode="efficiency", - ylabel=r"$n_{trk}^{match}/n_{trk}^{true}$", + ylabel="Track Assignment Efficiency", xlabel=xlabel, logy=False, atlas_first_tag=self.atlas_first_tag, atlas_second_tag=atlas_second_tag + f", {flav.label}", y_scale=1.4, ) + # $n_{trk}^{match}/n_{trk}^{reco}$ plot_vtx_trk_purity = VarVsVtxPlot( mode="purity", - ylabel=r"$n_{trk}^{match}/n_{trk}^{reco}$", + ylabel="Track Assignment Purity", xlabel=xlabel, logy=False, atlas_first_tag=self.atlas_first_tag, @@ -362,7 +366,7 @@ def plot_var_vtx_perf( plot_vtx_fakes = VarVsVtxPlot( mode="fakes", - ylabel=r"$n_{vtx}^{reco}$", + ylabel="Vertex Rate", xlabel=xlabel, logy=False, atlas_first_tag=self.atlas_first_tag, From 5f1b9e68526195886ac1d34c039dd9a6cf40a3e5 Mon Sep 17 00:00:00 2001 From: Sam Van Stroud Date: Thu, 11 Jul 2024 14:33:53 +0100 Subject: [PATCH 3/4] changelog --- changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/changelog.md b/changelog.md index e5ab4d40..90668d7c 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,7 @@ # Changelog ### [Latest] +- Minor updates for aux task plots [!273](https://github.com/umami-hep/puma/pull/273) - Redefined fake rate [!268](https://github.com/umami-hep/puma/pull/268) - Removed padded tracks from consideration when generating track origin classification CM [!267](https://github.com/umami-hep/puma/pull/267) - Confusion Matrix: added per-class fake rates plus minor appearance changes [!266](https://github.com/umami-hep/puma/pull/266) From ae3466c13e4413272b96612892056e1b08d65176 Mon Sep 17 00:00:00 2001 From: Sam Van Stroud Date: Thu, 11 Jul 2024 14:50:54 +0100 Subject: [PATCH 4/4] revert default, update aux results --- puma/hlplots/aux_results.py | 1 + puma/matshow.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/puma/hlplots/aux_results.py b/puma/hlplots/aux_results.py index 1501b334..17ff85e7 100644 --- a/puma/hlplots/aux_results.py +++ b/puma/hlplots/aux_results.py @@ -461,6 +461,7 @@ def plot_track_origin_confmat( ylabel="Target Classes", atlas_second_tag=self.atlas_second_tag, atlas_tag_outside=True, + show_cbar=False, **kwargs, ) plot_cm.draw(cm) diff --git a/puma/matshow.py b/puma/matshow.py index a0ffe3a8..13caa622 100644 --- a/puma/matshow.py +++ b/puma/matshow.py @@ -21,7 +21,7 @@ def __init__( show_percentage: bool = False, text_color_threshold: float = 0.408, colormap: plt.cm = plt.cm.Oranges, - show_cbar: bool = False, + show_cbar: bool = True, cbar_label: str | None = None, **kwargs, ) -> None: