-
Notifications
You must be signed in to change notification settings - Fork 18
Closed
Description
Description
The argument boxpctiles for plotting error bars in violin, bar, etc, are supposed to be equivalent to boxpctile, adding a box from the 0.25 quantile to the 0.75 quantile when boxpctiles = True. However, I think currently boxpctiles has no effect on the plots.
MVE 1
import numpy as np
import ultraplot as uplt
data = np.array([0, 1, 2, 3]).reshape(-1, 1)
fig, axes = uplt.subplots(ncols=5)
axes[0].violin(data, median=True)
axes[0].format(title='default')
axes[1].violin(data, median=True, boxpctiles=True)
axes[1].format(title='boxpctiles')
axes[2].violin(data, median=True, boxpctile=True)
axes[2].format(title='boxpctile')
axes[3].violin(data, median=True, boxstd=True)
axes[3].format(title='boxstd')
axes[4].violin(data, median=True, boxstds=True)
axes[4].format(title='boxstds')
fig.show()
Expected and actual behaviors
Expected: the same plot as 'boxpctile', with the box starting at 0.75 (Q1) and ending at 2.25 (Q3).
Actual: the same plot as the default arguments, 'boxstd' and 'boxstds'.
MVE 2
import numpy as np
import ultraplot as uplt
data = np.array([0, 1, 2, 3]).reshape(-1, 1)
fig, axes = uplt.subplots(ncols=4)
axes[0].bar(data, median=True, boxpctiles=True, bars=False)
axes[0].format(title='boxpctiles')
axes[1].bar(data, median=True, boxpctile=True, bars=False)
axes[1].format(title='boxpctile')
axes[2].bar(data, median=True, boxstd=True, bars=False)
axes[2].format(title='boxstd')
axes[3].bar(data, median=True, boxstds=True, bars=False)
axes[3].format(title='boxstds')
fig.show()
Expected and actual behaviors
Expected: the same plot as 'boxpctile', with the box starting at 0.75 (Q1) and ending at 2.25 (Q3).
Actual: no error bars, as if the boxpctiles argument has no effect.
Versions
- ultraplot: 1.65.0
- numpy: 2.2.4
cvanelteren
Metadata
Metadata
Assignees
Labels
No labels