我尝试使用beeswarm通过以下代码绘制一些数据:
import beeswarm
from beeswarm import *
import numpy as np
d = np.array([0,1,2,3,4])
beeswarm([d])
然后出现错误:
Traceback (most recent call last):
File "/home/sunyp/softwares/build/Anaconda2-5.1.0/lib/python2.7/site-packages/IPython/core/interactiveshell.py", line 2882, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-21-26de9ff62f6f>", line 1, in <module>
beeswarm([d1])
TypeError: 'module' object is not callable
有人知道如何处理这个问题吗?预先谢谢你。
答案 0 :(得分:0)
确保已安装pybeeswarm。这对我有用:
import matplotlib.pyplot as plt
from beeswarm import *
import numpy as np
d = np.array([0,1,2,3,4])
beeswarm([d])
plt.show()