From 9b861be894054caa30c699bb554908807f5dd774 Mon Sep 17 00:00:00 2001 From: Zahari Kassabov Date: Mon, 19 Jun 2023 10:50:17 +0100 Subject: [PATCH] Improve comments --- validphys2/src/validphys/dataplots.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/validphys2/src/validphys/dataplots.py b/validphys2/src/validphys/dataplots.py index 3999ff6386..7a66a2e3e9 100644 --- a/validphys2/src/validphys/dataplots.py +++ b/validphys2/src/validphys/dataplots.py @@ -852,7 +852,7 @@ def plot_replica_sum_rules(pdf, sum_rules, Q): @figuregen -def plot_smpdf(pdf, dataset, obs_pdf_correlations, mark_threshold:float=0.9): +def plot_smpdf(pdf, dataset, obs_pdf_correlations, mark_threshold: float = 0.9): """ Plot the correlations between the change in the observable and the change in the PDF in (x,fl) space. @@ -893,7 +893,8 @@ def plot_smpdf(pdf, dataset, obs_pdf_correlations, mark_threshold:float=0.9): categorical = not np.issubdtype(plotting_var.dtype, np.number) if categorical: - # Categorical + # Plot lines using a categorical color map (for a reasonable number of + # categories), and set up the categorical labels (used below). categorical_keys, values = np.unique(plotting_var, return_inverse=True) plotting_var = values num_categories = len(categorical_keys)