p <- plot_ly()
for(kk in 1:5) {
tmp <- cbind(rnorm(1) + 0.05*rnorm(15),rnorm(1) + 0.05*rnorm(15))
p %<>% add_trace(x = tmp[,1], y = tmp[,2], type = "scatter", mode = "markers")
plotly_build(p)
}
然后spyder IDE给我错误消息,如
from pylab import *
似乎Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\zhanglu\Anaconda\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 580, in runfile
execfile(filename, namespace)
File "C:/Users/zhanglu/Documents/Python Scripts/test1.py", line 8, in <module>
import pylab # Depreciated
File "pylab.py", line 29, in <module>
figure()
NameError: name 'figure' is not defined
出错但我不知道如何修复它。事实上,几周前这样的代码片段工作得很好,所以我猜一些不端行为导致了麻烦,但我不知道哪个。那么,IDE在执行代码之前会给我一些警告,如
figure()
此外,我还想知道如何演示anaconda已经安装的所有python模块的名单。