Repository: arviz-devs/arviz

Issue:
Add input core dims to plot_hdi doc strings
**Describe the bug**
`input_core_dims` doc string is missing even though its documented below in the examples in both `az.hdi` and `az.plot_hdi`

https://arviz-devs.github.io/arviz/generated/arviz.plot_hdi.html#arviz.plot_hdi
https://arviz-devs.github.io/arviz/generated/arviz.hdi.html#arviz.hdi

**Suggested fix**
Add to both documentation strings



Discussion:
It's a keyword argument passed as `**kwargs`, it's not only `input_core_dims` that can be used but any of the arguments accepted by `wrap_xarray_ufunc` which is referenced and linked in the dosctring. 

I think it would be better to extend the explanation in the example that uses it to make this clear.
Can you provide some example of what needs to be added here.
## hdi
in `hdi` doc, we could change the 

``` 
If we want to calculate the HDI over specified dimension of dataset, we can pass input_core_dims by kwargs:
```

like with something like

```
By default, ``hdi`` is calculated over the ``chain`` and ``draw`` dimensions. We can use the 
``input_core_dims`` argument of :func:`~arviz.wrap_xarray_ufunc` to change this. In this example 
we calculate the HDI also over the ``school`` dimension:
```

and also change the code right below from `az.hdi(data, input_core_dims = [["chain"]])` to 

```
az.hdi(data, input_core_dims = [["chain", "draw", "school"]])
```

## plot_hdi
Change 

```
Precalculate HDI interval per chain and plot separately:
```

to

```
``plot_hdi`` can also be given precalculated values with the argument ``hdi_data``. This example 
shows how to use :func:`~arviz.hdi` to precalculate the values and pass these values to ``plot_hdi``. 
Similarly to an example in ``hdi`` we are using the ``input_core_dims`` argument of :func:`~arviz.wrap_xarray_ufunc` 
to manually define the dimensions over which to calculate the HDI.
```

What do you think @canyon289 ?

@abhisht51 if this were clear now, would you like to work on this issue?
I have understood what needs to be modified in the docs. I would be issuing a pull request soon!! 

Resolving patch:
diff --git a/arviz/plots/hdiplot.py b/arviz/plots/hdiplot.py
--- a/arviz/plots/hdiplot.py
+++ b/arviz/plots/hdiplot.py
@@ -100,7 +100,11 @@ def plot_hdi(
         >>> y_data = np.random.normal(2 + x_data * 0.5, 0.5, (2, 50, 100))
         >>> az.plot_hdi(x_data, y_data)
 
-    Precalculate HDI interval per chain and plot separately:
+    ``plot_hdi`` can also be given precalculated values with the argument ``hdi_data``. This example
+    shows how to use :func:`~arviz.hdi` to precalculate the values and pass these values to
+    ``plot_hdi``. Similarly to an example in ``hdi`` we are using the ``input_core_dims``
+    argument of :func:`~arviz.wrap_xarray_ufunc` to manually define the dimensions over which
+    to calculate the HDI.
 
     .. plot::
         :context: close-figs
diff --git a/arviz/stats/stats.py b/arviz/stats/stats.py
--- a/arviz/stats/stats.py
+++ b/arviz/stats/stats.py
@@ -441,12 +441,13 @@ def hdi(
 
         In [1]: az.hdi(data, var_names=["mu", "theta"])
 
-    If we want to calculate the HDI over specified dimension of dataset,
-    we can pass `input_core_dims` by kwargs:
+    By default, ``hdi`` is calculated over the ``chain`` and ``draw`` dimensions. We can use the
+    ``input_core_dims`` argument of :func:`~arviz.wrap_xarray_ufunc` to change this. In this example
+    we calculate the HDI also over the ``school`` dimension:
 
     .. ipython::
 
-        In [1]: az.hdi(data, input_core_dims = [["chain"]])
+        In [1]: az.hdi(data, input_core_dims = [["chain","draw", "school"]])
 
     We can also calculate the hdi over a particular selection over all groups:
 


Test patch: