diff --git a/p3analysis/plot/backend/matplotlib.py b/p3analysis/plot/backend/matplotlib.py index 387ef33..c09d005 100644 --- a/p3analysis/plot/backend/matplotlib.py +++ b/p3analysis/plot/backend/matplotlib.py @@ -467,7 +467,7 @@ def __init__( else: if eff not in ["app", "arch"]: raise ValueError("'eff' must be 'app' or 'arch'.") - pp_column = eff + " eff" + pp_column = eff + " pp" if pp_column not in pp: msg = "DataFrame does not contain an '%s' column." raise ValueError(msg % (pp_column)) diff --git a/p3analysis/plot/backend/pgfplots.py b/p3analysis/plot/backend/pgfplots.py index ef509a4..030563a 100644 --- a/p3analysis/plot/backend/pgfplots.py +++ b/p3analysis/plot/backend/pgfplots.py @@ -289,7 +289,7 @@ def __init__( else: if eff not in ["app", "arch"]: raise ValueError("'eff' must be 'app' or 'arch'.") - pp_column = eff + " eff" + pp_column = eff + " pp" if pp_column not in pp: msg = "DataFrame does not contain an '%s' column." raise ValueError(msg % (pp_column)) diff --git a/tests/plot/test_navchart.py b/tests/plot/test_navchart.py index 24753b2..95f0d92 100644 --- a/tests/plot/test_navchart.py +++ b/tests/plot/test_navchart.py @@ -34,6 +34,19 @@ def test_required_columns(self): with self.assertRaises(ValueError): navchart(pp, cd, eff="invalid") + pp = pd.DataFrame({ + "problem": ["problem"], + "platform": ["platform"], + "application": ["application"], + "app pp": [1.0], + }) + cd = pd.DataFrame({ + "problem": ["problem"], + "application": ["application"], + "divergence": [0.0], + }) + navchart(pp, cd) + def test_options(self): """p3analysis.plot.navchart.options"""