在尝试构建SciPy概率图时,我一直收到以下错误
Traceback (most recent call last):
File "deadrabbit_console_0-1.py", line 202, in <module>
DRconsole().cmdloop()
File "/usr/lib/python2.7/cmd.py", line 142, in cmdloop
stop = self.onecmd(line)
File "/usr/lib/python2.7/cmd.py", line 221, in onecmd
return func(arg)
File "deadrabbit_console_0-1.py", line 196, in do_analyze_run
a.plot(targt_data)
File "/home/baconwichsand/Documents/deadrabbit/branches/analysis.py", line 279, in plot
self.draw(targt_data)
File "/home/baconwichsand/Documents/deadrabbit/branches/analysis.py", line 186, in draw
probplot(prob, self._timefrm[i])
File "/home/baconwichsand/Documents/deadrabbit/branches/analysis.py", line 89, in probplot
stats.probplot(data, sparams=params, plot=plot)
File "/usr/lib/python2.7/dist-packages/scipy/stats/morestats.py", line 355, in probplot
plot.title('Probability Plot')
TypeError: 'Text' object is not callable
这是我的probplot
函数,对于我正在传递pylab.subplot2grid
图的情节(在其他地方工作)
def probplot(plot, timeframe):
"""Probability plot given certain timeframe"""
data = sample[np.where(sample[:, 4] == timeframe)][:, 5]
mu = np.mean(data)
sigma = np.std(data)
alpha = stats.skew(data)
x_plot = np.linspace(min(data), max(data), 1000)
params = (mu, sigma, alpha)
stats.probplot(data, sparams=params, plot=plot)
答案 0 :(得分:0)
这是0.10.1中的一个问题。更新后工作。