arviz 0.17.1__py3-none-any.whl → 0.19.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- arviz/__init__.py +4 -2
- arviz/data/__init__.py +5 -2
- arviz/data/base.py +102 -11
- arviz/data/converters.py +5 -0
- arviz/data/datasets.py +1 -0
- arviz/data/example_data/data_remote.json +10 -3
- arviz/data/inference_data.py +20 -22
- arviz/data/io_cmdstan.py +5 -3
- arviz/data/io_datatree.py +1 -0
- arviz/data/io_dict.py +5 -3
- arviz/data/io_emcee.py +1 -0
- arviz/data/io_numpyro.py +2 -1
- arviz/data/io_pyjags.py +1 -0
- arviz/data/io_pyro.py +1 -0
- arviz/data/utils.py +1 -0
- arviz/plots/__init__.py +1 -0
- arviz/plots/autocorrplot.py +1 -0
- arviz/plots/backends/bokeh/autocorrplot.py +1 -0
- arviz/plots/backends/bokeh/bpvplot.py +1 -0
- arviz/plots/backends/bokeh/compareplot.py +1 -0
- arviz/plots/backends/bokeh/densityplot.py +1 -0
- arviz/plots/backends/bokeh/distplot.py +1 -0
- arviz/plots/backends/bokeh/dotplot.py +1 -0
- arviz/plots/backends/bokeh/ecdfplot.py +2 -2
- arviz/plots/backends/bokeh/elpdplot.py +1 -0
- arviz/plots/backends/bokeh/energyplot.py +1 -0
- arviz/plots/backends/bokeh/hdiplot.py +1 -0
- arviz/plots/backends/bokeh/kdeplot.py +3 -3
- arviz/plots/backends/bokeh/khatplot.py +9 -3
- arviz/plots/backends/bokeh/lmplot.py +1 -0
- arviz/plots/backends/bokeh/loopitplot.py +1 -0
- arviz/plots/backends/bokeh/mcseplot.py +1 -0
- arviz/plots/backends/bokeh/pairplot.py +3 -6
- arviz/plots/backends/bokeh/parallelplot.py +1 -0
- arviz/plots/backends/bokeh/posteriorplot.py +1 -0
- arviz/plots/backends/bokeh/ppcplot.py +1 -0
- arviz/plots/backends/bokeh/rankplot.py +1 -0
- arviz/plots/backends/bokeh/separationplot.py +1 -0
- arviz/plots/backends/bokeh/traceplot.py +1 -0
- arviz/plots/backends/bokeh/violinplot.py +1 -0
- arviz/plots/backends/matplotlib/autocorrplot.py +1 -0
- arviz/plots/backends/matplotlib/bpvplot.py +1 -0
- arviz/plots/backends/matplotlib/compareplot.py +1 -0
- arviz/plots/backends/matplotlib/densityplot.py +1 -0
- arviz/plots/backends/matplotlib/distcomparisonplot.py +2 -3
- arviz/plots/backends/matplotlib/distplot.py +1 -0
- arviz/plots/backends/matplotlib/dotplot.py +1 -0
- arviz/plots/backends/matplotlib/ecdfplot.py +2 -2
- arviz/plots/backends/matplotlib/elpdplot.py +1 -0
- arviz/plots/backends/matplotlib/energyplot.py +1 -0
- arviz/plots/backends/matplotlib/essplot.py +6 -5
- arviz/plots/backends/matplotlib/forestplot.py +1 -0
- arviz/plots/backends/matplotlib/hdiplot.py +1 -0
- arviz/plots/backends/matplotlib/kdeplot.py +5 -3
- arviz/plots/backends/matplotlib/khatplot.py +8 -3
- arviz/plots/backends/matplotlib/lmplot.py +1 -0
- arviz/plots/backends/matplotlib/loopitplot.py +1 -0
- arviz/plots/backends/matplotlib/mcseplot.py +11 -10
- arviz/plots/backends/matplotlib/pairplot.py +2 -1
- arviz/plots/backends/matplotlib/parallelplot.py +1 -0
- arviz/plots/backends/matplotlib/posteriorplot.py +1 -0
- arviz/plots/backends/matplotlib/ppcplot.py +1 -0
- arviz/plots/backends/matplotlib/rankplot.py +1 -0
- arviz/plots/backends/matplotlib/separationplot.py +1 -0
- arviz/plots/backends/matplotlib/traceplot.py +2 -1
- arviz/plots/backends/matplotlib/tsplot.py +1 -0
- arviz/plots/backends/matplotlib/violinplot.py +2 -1
- arviz/plots/bpvplot.py +3 -2
- arviz/plots/compareplot.py +1 -0
- arviz/plots/densityplot.py +2 -1
- arviz/plots/distcomparisonplot.py +1 -0
- arviz/plots/dotplot.py +3 -2
- arviz/plots/ecdfplot.py +206 -89
- arviz/plots/elpdplot.py +1 -0
- arviz/plots/energyplot.py +1 -0
- arviz/plots/essplot.py +3 -2
- arviz/plots/forestplot.py +2 -1
- arviz/plots/hdiplot.py +3 -2
- arviz/plots/khatplot.py +24 -6
- arviz/plots/lmplot.py +1 -0
- arviz/plots/loopitplot.py +3 -2
- arviz/plots/mcseplot.py +4 -1
- arviz/plots/pairplot.py +1 -0
- arviz/plots/parallelplot.py +1 -0
- arviz/plots/plot_utils.py +3 -4
- arviz/plots/posteriorplot.py +2 -1
- arviz/plots/ppcplot.py +1 -0
- arviz/plots/rankplot.py +3 -2
- arviz/plots/separationplot.py +1 -0
- arviz/plots/traceplot.py +1 -0
- arviz/plots/tsplot.py +1 -0
- arviz/plots/violinplot.py +2 -1
- arviz/preview.py +17 -0
- arviz/rcparams.py +28 -2
- arviz/sel_utils.py +1 -0
- arviz/static/css/style.css +2 -1
- arviz/stats/density_utils.py +2 -1
- arviz/stats/diagnostics.py +15 -11
- arviz/stats/ecdf_utils.py +12 -8
- arviz/stats/stats.py +31 -16
- arviz/stats/stats_refitting.py +1 -0
- arviz/stats/stats_utils.py +13 -7
- arviz/tests/base_tests/test_data.py +15 -2
- arviz/tests/base_tests/test_data_zarr.py +0 -1
- arviz/tests/base_tests/test_diagnostics.py +1 -0
- arviz/tests/base_tests/test_diagnostics_numba.py +2 -6
- arviz/tests/base_tests/test_helpers.py +2 -2
- arviz/tests/base_tests/test_labels.py +1 -0
- arviz/tests/base_tests/test_plot_utils.py +5 -13
- arviz/tests/base_tests/test_plots_matplotlib.py +98 -7
- arviz/tests/base_tests/test_rcparams.py +12 -0
- arviz/tests/base_tests/test_stats.py +5 -5
- arviz/tests/base_tests/test_stats_numba.py +2 -7
- arviz/tests/base_tests/test_stats_utils.py +1 -0
- arviz/tests/base_tests/test_utils.py +3 -2
- arviz/tests/base_tests/test_utils_numba.py +2 -5
- arviz/tests/external_tests/test_data_pystan.py +5 -5
- arviz/tests/helpers.py +18 -10
- arviz/utils.py +4 -0
- arviz/wrappers/__init__.py +1 -0
- {arviz-0.17.1.dist-info → arviz-0.19.0.dist-info}/METADATA +13 -9
- arviz-0.19.0.dist-info/RECORD +183 -0
- arviz-0.17.1.dist-info/RECORD +0 -182
- {arviz-0.17.1.dist-info → arviz-0.19.0.dist-info}/LICENSE +0 -0
- {arviz-0.17.1.dist-info → arviz-0.19.0.dist-info}/WHEEL +0 -0
- {arviz-0.17.1.dist-info → arviz-0.19.0.dist-info}/top_level.txt +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"""Bokeh pareto shape plot."""
|
|
2
|
+
|
|
2
3
|
from collections.abc import Iterable
|
|
3
4
|
|
|
4
5
|
from matplotlib import cm
|
|
@@ -20,6 +21,7 @@ def plot_khat(
|
|
|
20
21
|
figsize,
|
|
21
22
|
xdata,
|
|
22
23
|
khats,
|
|
24
|
+
good_k,
|
|
23
25
|
kwargs,
|
|
24
26
|
threshold,
|
|
25
27
|
coord_labels,
|
|
@@ -52,7 +54,11 @@ def plot_khat(
|
|
|
52
54
|
|
|
53
55
|
if hlines_kwargs is None:
|
|
54
56
|
hlines_kwargs = {}
|
|
55
|
-
|
|
57
|
+
|
|
58
|
+
if good_k is None:
|
|
59
|
+
good_k = 0.7
|
|
60
|
+
|
|
61
|
+
hlines_kwargs.setdefault("hlines", [0, good_k, 1])
|
|
56
62
|
|
|
57
63
|
cmap = None
|
|
58
64
|
if isinstance(color, str):
|
|
@@ -74,7 +80,7 @@ def plot_khat(
|
|
|
74
80
|
rgba_c = cmap(color)
|
|
75
81
|
|
|
76
82
|
khats = khats if isinstance(khats, np.ndarray) else khats.values.flatten()
|
|
77
|
-
alphas = 0.5 + 0.2 * (khats >
|
|
83
|
+
alphas = 0.5 + 0.2 * (khats > good_k) + 0.3 * (khats > 1)
|
|
78
84
|
|
|
79
85
|
rgba_c = vectorized_to_hex(rgba_c)
|
|
80
86
|
|
|
@@ -129,7 +135,7 @@ def plot_khat(
|
|
|
129
135
|
xmax = len(khats)
|
|
130
136
|
|
|
131
137
|
if show_bins:
|
|
132
|
-
bin_edges = np.array([ymin,
|
|
138
|
+
bin_edges = np.array([ymin, good_k, 1, ymax])
|
|
133
139
|
bin_edges = bin_edges[(bin_edges >= ymin) & (bin_edges <= ymax)]
|
|
134
140
|
hist, _, _ = histogram(khats, bin_edges)
|
|
135
141
|
for idx, count in enumerate(hist):
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"""Bokeh pairplot."""
|
|
2
|
+
|
|
2
3
|
import warnings
|
|
3
4
|
from copy import deepcopy
|
|
4
5
|
from uuid import uuid4
|
|
@@ -173,12 +174,8 @@ def plot_pair(
|
|
|
173
174
|
source = ColumnDataSource(data=source_dict)
|
|
174
175
|
|
|
175
176
|
if divergences:
|
|
176
|
-
source_nondiv = CDSView(
|
|
177
|
-
|
|
178
|
-
)
|
|
179
|
-
source_div = CDSView(
|
|
180
|
-
source=source, filters=[GroupFilter(column_name=divergenve_name, group="1")]
|
|
181
|
-
)
|
|
177
|
+
source_nondiv = CDSView(filter=GroupFilter(column_name=divergenve_name, group="0"))
|
|
178
|
+
source_div = CDSView(filter=GroupFilter(column_name=divergenve_name, group="1"))
|
|
182
179
|
|
|
183
180
|
def get_width_and_height(jointplot, rotate):
|
|
184
181
|
"""Compute subplots dimensions for two or more variables."""
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"""Matplotlib Density Comparison plot."""
|
|
2
|
+
|
|
2
3
|
import matplotlib.pyplot as plt
|
|
3
4
|
import numpy as np
|
|
4
5
|
|
|
@@ -88,9 +89,7 @@ def plot_dist_comparison(
|
|
|
88
89
|
kwargs = (
|
|
89
90
|
prior_kwargs
|
|
90
91
|
if group.startswith("prior")
|
|
91
|
-
else posterior_kwargs
|
|
92
|
-
if group.startswith("posterior")
|
|
93
|
-
else observed_kwargs
|
|
92
|
+
else posterior_kwargs if group.startswith("posterior") else observed_kwargs
|
|
94
93
|
)
|
|
95
94
|
for idx2, (
|
|
96
95
|
var_name,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"""Matplotlib ecdfplot."""
|
|
2
|
+
|
|
2
3
|
import matplotlib.pyplot as plt
|
|
3
4
|
from matplotlib.colors import to_hex
|
|
4
5
|
|
|
@@ -12,7 +13,6 @@ def plot_ecdf(
|
|
|
12
13
|
x_bands,
|
|
13
14
|
lower,
|
|
14
15
|
higher,
|
|
15
|
-
confidence_bands,
|
|
16
16
|
plot_kwargs,
|
|
17
17
|
fill_kwargs,
|
|
18
18
|
plot_outline_kwargs,
|
|
@@ -58,7 +58,7 @@ def plot_ecdf(
|
|
|
58
58
|
|
|
59
59
|
ax.step(x_coord, y_coord, **plot_kwargs)
|
|
60
60
|
|
|
61
|
-
if
|
|
61
|
+
if x_bands is not None:
|
|
62
62
|
if fill_band:
|
|
63
63
|
ax.fill_between(x_bands, lower, higher, **fill_kwargs)
|
|
64
64
|
else:
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"""Matplotlib energyplot."""
|
|
2
|
+
|
|
2
3
|
import matplotlib.pyplot as plt
|
|
3
4
|
import numpy as np
|
|
4
5
|
from scipy.stats import rankdata
|
|
@@ -127,11 +128,11 @@ def plot_ess(
|
|
|
127
128
|
ax_.annotate(
|
|
128
129
|
"mean",
|
|
129
130
|
(text_x, mean_ess_i),
|
|
130
|
-
va=
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
131
|
+
va=(
|
|
132
|
+
text_va
|
|
133
|
+
if text_va is not None
|
|
134
|
+
else "bottom" if mean_ess_i >= sd_ess_i else "top"
|
|
135
|
+
),
|
|
135
136
|
**text_kwargs,
|
|
136
137
|
)
|
|
137
138
|
ax_.axhline(sd_ess_i, **extra_kwargs)
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"""Matplotlib kdeplot."""
|
|
2
|
+
|
|
2
3
|
import numpy as np
|
|
3
4
|
from matplotlib import pyplot as plt
|
|
4
5
|
from matplotlib import _pylab_helpers
|
|
@@ -162,10 +163,11 @@ def plot_kde(
|
|
|
162
163
|
ax.grid(False)
|
|
163
164
|
if contour:
|
|
164
165
|
qcfs = ax.contourf(x_x, y_y, density, antialiased=True, **contourf_kwargs)
|
|
165
|
-
|
|
166
|
+
ax.contour(x_x, y_y, density, **contour_kwargs)
|
|
166
167
|
if not fill_last:
|
|
167
|
-
qcfs.
|
|
168
|
-
|
|
168
|
+
alpha = np.ones(len(qcfs.allsegs), dtype=float)
|
|
169
|
+
alpha[0] = 0
|
|
170
|
+
qcfs.set_alpha(alpha)
|
|
169
171
|
else:
|
|
170
172
|
ax.pcolormesh(x_x, y_y, density, **pcolormesh_kwargs)
|
|
171
173
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"""Matplotlib khatplot."""
|
|
2
|
+
|
|
2
3
|
import warnings
|
|
3
4
|
|
|
4
5
|
import matplotlib as mpl
|
|
@@ -19,6 +20,7 @@ def plot_khat(
|
|
|
19
20
|
figsize,
|
|
20
21
|
xdata,
|
|
21
22
|
khats,
|
|
23
|
+
good_k,
|
|
22
24
|
kwargs,
|
|
23
25
|
threshold,
|
|
24
26
|
coord_labels,
|
|
@@ -60,8 +62,11 @@ def plot_khat(
|
|
|
60
62
|
backend_kwargs.setdefault("figsize", figsize)
|
|
61
63
|
backend_kwargs["squeeze"] = True
|
|
62
64
|
|
|
65
|
+
if good_k is None:
|
|
66
|
+
good_k = 0.7
|
|
67
|
+
|
|
63
68
|
hlines_kwargs = matplotlib_kwarg_dealiaser(hlines_kwargs, "hlines")
|
|
64
|
-
hlines_kwargs.setdefault("hlines", [0,
|
|
69
|
+
hlines_kwargs.setdefault("hlines", [0, good_k, 1])
|
|
65
70
|
hlines_kwargs.setdefault("linestyle", [":", "-.", "--", "-"])
|
|
66
71
|
hlines_kwargs.setdefault("alpha", 0.7)
|
|
67
72
|
hlines_kwargs.setdefault("zorder", -1)
|
|
@@ -101,7 +106,7 @@ def plot_khat(
|
|
|
101
106
|
rgba_c = cmap(norm_fun(color))
|
|
102
107
|
|
|
103
108
|
khats = khats if isinstance(khats, np.ndarray) else khats.values.flatten()
|
|
104
|
-
alphas = 0.5 + 0.2 * (khats >
|
|
109
|
+
alphas = 0.5 + 0.2 * (khats > good_k) + 0.3 * (khats > 1)
|
|
105
110
|
rgba_c[:, 3] = alphas
|
|
106
111
|
rgba_c = vectorized_to_hex(rgba_c)
|
|
107
112
|
kwargs["c"] = rgba_c
|
|
@@ -150,7 +155,7 @@ def plot_khat(
|
|
|
150
155
|
)
|
|
151
156
|
|
|
152
157
|
if show_bins:
|
|
153
|
-
bin_edges = np.array([ymin,
|
|
158
|
+
bin_edges = np.array([ymin, good_k, 1, ymax])
|
|
154
159
|
bin_edges = bin_edges[(bin_edges >= ymin) & (bin_edges <= ymax)]
|
|
155
160
|
hist, _, _ = histogram(khats, bin_edges)
|
|
156
161
|
for idx, count in enumerate(hist):
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"""Matplotlib mcseplot."""
|
|
2
|
+
|
|
2
3
|
import matplotlib.pyplot as plt
|
|
3
4
|
import numpy as np
|
|
4
5
|
from scipy.stats import rankdata
|
|
@@ -94,22 +95,22 @@ def plot_mcse(
|
|
|
94
95
|
ax_.annotate(
|
|
95
96
|
"mean",
|
|
96
97
|
(text_x, mean_mcse_i),
|
|
97
|
-
va=
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
98
|
+
va=(
|
|
99
|
+
text_va
|
|
100
|
+
if text_va is not None
|
|
101
|
+
else "bottom" if mean_mcse_i > sd_mcse_i else "top"
|
|
102
|
+
),
|
|
102
103
|
**text_kwargs,
|
|
103
104
|
)
|
|
104
105
|
ax_.axhline(sd_mcse_i, **extra_kwargs)
|
|
105
106
|
ax_.annotate(
|
|
106
107
|
"sd",
|
|
107
108
|
(text_x, sd_mcse_i),
|
|
108
|
-
va=
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
109
|
+
va=(
|
|
110
|
+
text_va
|
|
111
|
+
if text_va is not None
|
|
112
|
+
else "bottom" if sd_mcse_i >= mean_mcse_i else "top"
|
|
113
|
+
),
|
|
113
114
|
**text_kwargs,
|
|
114
115
|
)
|
|
115
116
|
if rug:
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"""Matplotlib pairplot."""
|
|
2
|
+
|
|
2
3
|
import warnings
|
|
3
4
|
from copy import deepcopy
|
|
4
5
|
|
|
@@ -333,7 +334,7 @@ def plot_pair(
|
|
|
333
334
|
if reference_values:
|
|
334
335
|
x_name = flat_var_names[i]
|
|
335
336
|
y_name = flat_var_names[j + not_marginals]
|
|
336
|
-
if x_name and y_name not in difference:
|
|
337
|
+
if (x_name not in difference) and (y_name not in difference):
|
|
337
338
|
ax[j, i].plot(
|
|
338
339
|
reference_values_copy[x_name],
|
|
339
340
|
reference_values_copy[y_name],
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"""Matplotlib traceplot."""
|
|
2
|
+
|
|
2
3
|
import warnings
|
|
3
4
|
from itertools import cycle
|
|
4
5
|
|
|
@@ -439,7 +440,7 @@ def plot_trace(
|
|
|
439
440
|
[], [], label="combined", **dealiase_sel_kwargs(plot_kwargs, chain_prop, -1)
|
|
440
441
|
),
|
|
441
442
|
)
|
|
442
|
-
ax.figure.axes[
|
|
443
|
+
ax.figure.axes[1].legend(handles=handles, title="chain", loc="upper right")
|
|
443
444
|
|
|
444
445
|
if axes is None:
|
|
445
446
|
axes = np.array(ax.figure.axes).reshape(-1, 2)
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"""Matplotlib Violinplot."""
|
|
2
|
+
|
|
2
3
|
import matplotlib.pyplot as plt
|
|
3
4
|
import numpy as np
|
|
4
5
|
|
|
@@ -60,7 +61,7 @@ def plot_violin(
|
|
|
60
61
|
cols,
|
|
61
62
|
backend_kwargs=backend_kwargs,
|
|
62
63
|
)
|
|
63
|
-
fig.
|
|
64
|
+
fig.set_layout_engine("none")
|
|
64
65
|
fig.subplots_adjust(wspace=0)
|
|
65
66
|
|
|
66
67
|
ax = np.atleast_1d(ax)
|
arviz/plots/bpvplot.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"""Bayesian p-value Posterior/Prior predictive plot."""
|
|
2
|
+
|
|
2
3
|
import numpy as np
|
|
3
4
|
|
|
4
5
|
from ..labels import BaseLabeller
|
|
@@ -79,7 +80,7 @@ def plot_bpv(
|
|
|
79
80
|
hdi_prob : float, optional
|
|
80
81
|
Probability for the highest density interval for the analytical reference distribution when
|
|
81
82
|
``kind=u_values``. Should be in the interval (0, 1]. Defaults to the
|
|
82
|
-
rcParam ``stats.
|
|
83
|
+
rcParam ``stats.ci_prob``. See :ref:`this section <common_hdi_prob>` for usage examples.
|
|
83
84
|
color : str, optional
|
|
84
85
|
Matplotlib color
|
|
85
86
|
grid : tuple, optional
|
|
@@ -201,7 +202,7 @@ def plot_bpv(
|
|
|
201
202
|
raise TypeError("`reference` argument must be either `analytical`, `samples`, or `None`")
|
|
202
203
|
|
|
203
204
|
if hdi_prob is None:
|
|
204
|
-
hdi_prob = rcParams["stats.
|
|
205
|
+
hdi_prob = rcParams["stats.ci_prob"]
|
|
205
206
|
elif not 1 >= hdi_prob > 0:
|
|
206
207
|
raise ValueError("The value of hdi_prob should be in the interval (0, 1]")
|
|
207
208
|
|
arviz/plots/compareplot.py
CHANGED
arviz/plots/densityplot.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"""KDE and histogram plots for multiple variables."""
|
|
2
|
+
|
|
2
3
|
import warnings
|
|
3
4
|
|
|
4
5
|
from ..data import convert_to_dataset
|
|
@@ -208,7 +209,7 @@ def plot_density(
|
|
|
208
209
|
)
|
|
209
210
|
|
|
210
211
|
if hdi_prob is None:
|
|
211
|
-
hdi_prob = rcParams["stats.
|
|
212
|
+
hdi_prob = rcParams["stats.ci_prob"]
|
|
212
213
|
elif not 1 >= hdi_prob > 0:
|
|
213
214
|
raise ValueError("The value of hdi_prob should be in the interval (0, 1]")
|
|
214
215
|
|
arviz/plots/dotplot.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"""Plot distribution as dot plot or quantile dot plot."""
|
|
2
|
+
|
|
2
3
|
import numpy as np
|
|
3
4
|
|
|
4
5
|
from ..rcparams import rcParams
|
|
@@ -66,7 +67,7 @@ def plot_dot(
|
|
|
66
67
|
The shape of the marker. Valid for matplotlib backend.
|
|
67
68
|
hdi_prob : float, optional
|
|
68
69
|
Valid only when point_interval is True. Plots HDI for chosen percentage of density.
|
|
69
|
-
Defaults to ``stats.
|
|
70
|
+
Defaults to ``stats.ci_prob`` rcParam. See :ref:`this section <common_hdi_prob>`
|
|
70
71
|
for usage examples.
|
|
71
72
|
rotated : bool, default False
|
|
72
73
|
Whether to rotate the dot plot by 90 degrees.
|
|
@@ -150,7 +151,7 @@ def plot_dot(
|
|
|
150
151
|
values.sort()
|
|
151
152
|
|
|
152
153
|
if hdi_prob is None:
|
|
153
|
-
hdi_prob = rcParams["stats.
|
|
154
|
+
hdi_prob = rcParams["stats.ci_prob"]
|
|
154
155
|
elif not 1 >= hdi_prob > 0:
|
|
155
156
|
raise ValueError("The value of hdi_prob should be in the interval (0, 1]")
|
|
156
157
|
|