We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3acd648 commit 4b438aaCopy full SHA for 4b438aa
ultraplot/axes/plot.py
@@ -2087,7 +2087,7 @@ def _add_error_bars(
2087
): # ugly kludge to check for shading
2088
if all(_ is None for _ in (bardata, barstds, barpctiles)):
2089
barstds, barpctiles = default_barstds, default_barpctiles
2090
- if all(_ is None for _ in (boxdata, boxstds, boxpctile)):
+ if all(_ is None for _ in (boxdata, boxstds, boxpctiles)):
2091
boxstds, boxpctiles = default_boxstds, default_boxpctiles
2092
showbars = any(
2093
_ is not None and _ is not False for _ in (barstds, barpctiles, bardata)
ultraplot/tests/test_statistical_plotting.py
@@ -71,3 +71,25 @@ def test_panel_dist(rng):
71
px.hist(x, bins, color=color, fill=True, ec="k")
72
px.format(grid=False, ylocator=[], title=title, titleloc="l")
73
return fig
74
+
75
76
+@pytest.mark.mpl_image_compare
77
+def test_input_violin_box_options():
78
+ """
79
+ Test various box options in violin plots.
80
81
+ data = np.array([0, 1, 2, 3]).reshape(-1, 1)
82
83
+ fig, axes = uplt.subplots(ncols=4)
84
+ axes[0].bar(data, median=True, boxpctiles=True, bars=False)
85
+ axes[0].format(title="boxpctiles")
86
87
+ axes[1].bar(data, median=True, boxpctile=True, bars=False)
88
+ axes[1].format(title="boxpctile")
89
90
+ axes[2].bar(data, median=True, boxstd=True, bars=False)
91
+ axes[2].format(title="boxstd")
92
93
+ axes[3].bar(data, median=True, boxstds=True, bars=False)
94
+ axes[3].format(title="boxstds")
95
+ return fig
0 commit comments