Violin plots fail with list inputs when data scale is logicle in FlowCal v1.3.0.
E.g.,
>>> FlowCal.plot.violin(data=[1,3,2,4,3])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\sexto\Downloads\taborlab_FlowCal\FlowCal\plot.py", line 1810, in violin
t = _LogicleTransform(data=data, channel=channel)
File "C:\Users\sexto\Downloads\taborlab_FlowCal\FlowCal\plot.py", line 271, in __init__
if d.ndim > 1:
AttributeError: 'list' object has no attribute 'ndim'
This happens because plot._LogicleTransform checks for multidimensional data using the ndim attribute, which numpy arrays have but lists do not. (The plot violin functions use _LogicleTransform to calculate default bin edges and implicitly when they set the Logicle scale. In both cases, data are provided as is.)
A simple work-around is to pass a numpy array to the plot functions.
Violin plots fail with list inputs when data scale is
logicle
inFlowCal v1.3.0
.E.g.,
This happens because
plot._LogicleTransform
checks for multidimensional data using thendim
attribute, which numpy arrays have but lists do not. (The plot violin functions use_LogicleTransform
to calculate default bin edges and implicitly when they set the Logicle scale. In both cases, data are provided as is.)A simple work-around is to pass a numpy array to the plot functions.