在Spyder中使用iplot
时,我总是遇到错误。
程序中使用的命令是data.iplot(kind='histogram', bins-15)
,我得到以下错误:
ValueError:
Invalid value of type 'builtins.str' received for the 'bgcolor' property of layout.legend
Received value: 'pearl02'
The 'bgcolor' property is a color and may be specified as:
- A hex string (e.g. '#ff0000')
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
- A named CSS color:
aliceblue, antiquewhite, aqua, aquamarine, azure,
beige, bisque, black, blanchedalmond, blue, .....
data.iplot(kind='histogram', bins-15)
定义数据的地方。
修改:
关于duplicate:
pip uninstall plotly pip install plotly==2.7.0
进行降级。现在我得到以下错误:
File "C:\Users\Admin\Anaconda3\lib\site-packages\plotly\graph_objs__init__.py", line 4798, in init NameError: name '_copy' is not defined