Repository: scikit-hep/hist

Issue:
rename gaus -> gauss
Hi @henryiii, @aminnj, I'm following your nice developments. I just wanted to make a comment now that I see `h.plot_pull("gaus")`: I know that ROOT does this, amputating Gauss's name to save a little letter, but I hate that. TBH I see no gain and consider far more important to save the great mathemacian's name. Could we please please do "gauss"?

_Originally posted by @eduardo-rodrigues in https://github.com/scikit-hep/hist/issues/149#issuecomment-801693962_

Discussion:

Patch:
diff --git a/src/hist/plot.py b/src/hist/plot.py
index 98ade81..b8ff20f 100644
--- a/src/hist/plot.py
+++ b/src/hist/plot.py
@@ -266,7 +266,7 @@ def plot_pull(
     yerr = np.sqrt(variances)
 
     if isinstance(func, str):
-        if func == "gaus":
+        if func in {"gauss", "gaus"}:
             # gaussian with reasonable initial guesses for parameters
             constant = float(ydata.max())
             mean = (ydata * xdata).sum() / ydata.sum()


Test patch:
diff --git a/tests/test_plot.py b/tests/test_plot.py
index 6bde0f0..7608dc6 100644
--- a/tests/test_plot.py
+++ b/tests/test_plot.py
@@ -235,9 +235,9 @@ def test_general_plot_pull():
 
     assert h.plot_pull(pdf_str)
 
-    assert h.plot_pull("gaus")
+    assert h.plot_pull("gauss")
 
-    assert h.plot_pull("gaus", likelihood=True)
+    assert h.plot_pull("gauss", likelihood=True)
 
     # dimension error
     hh = Hist(
@@ -534,9 +534,9 @@ def test_named_plot_pull():
 
     assert h.plot_pull(pdf_str)
 
-    assert h.plot_pull("gaus")
+    assert h.plot_pull("gauss")
 
-    assert h.plot_pull("gaus", likelihood=True)
+    assert h.plot_pull("gauss", likelihood=True)
 
     # dimension error
     hh = NamedHist(