Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jsp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python ValueError:为plotly.graph_objs.layout.Geo:'类型的对象指定的属性无效;fitbounds';_Python_Data Visualization_Plotly Dash - Fatal编程技术网

Python ValueError:为plotly.graph_objs.layout.Geo:'类型的对象指定的属性无效;fitbounds';

Python ValueError:为plotly.graph_objs.layout.Geo:'类型的对象指定的属性无效;fitbounds';,python,data-visualization,plotly-dash,Python,Data Visualization,Plotly Dash,我正试图用虚线绘出一张叶绿素地图,由于数据绑定到欧洲,我希望默认的缩放集中在那里。Plotly中应有边界拟合功能,如教程文档中所述: 然而,我无法让它工作,在我的地图上,但即使是在本基础教程中,我也总是得到: ValueError: Invalid property specified for object of type plotly.graph_objs.layout.Geo: 'fitbounds' 奇怪的是,似乎没有为geos定义fitbounds属性 复制问题的代码: fi

我正试图用虚线绘出一张叶绿素地图,由于数据绑定到欧洲,我希望默认的缩放集中在那里。Plotly中应有边界拟合功能,如教程文档中所述:

然而,我无法让它工作,在我的地图上,但即使是在本基础教程中,我也总是得到:

   ValueError: Invalid property specified for object of type plotly.graph_objs.layout.Geo: 'fitbounds'
奇怪的是,似乎没有为geos定义fitbounds属性

复制问题的代码:

fig = px.line_geo(lat=[0, 15, 20, 35], lon=[5, 10, 25, 30])
fig.update_geos(fitbounds="locations")
fig.update_layout(height=300, margin={"r": 0, "t": 0, "l": 0, "b": 0})

这可能是什么原因造成的?

我只是想了解您的问题,我必须安装nbformat软件包。安装之后,它工作得非常好。也许你的问题只是更新问题**请注意,我还不能发表任何评论,这就是为什么我要发布一个答案

pip(3) install --upgrade nbformat
pip(3) install --upgrade plotly

对于我来说,只是想了解您的问题,我必须安装nbformat软件包。安装之后,它工作得非常好。也许你的问题只是更新问题**请注意,我还不能发表任何评论,这就是为什么我要发布一个答案

pip(3) install --upgrade nbformat
pip(3) install --upgrade plotly

嗨-你把我带到了正确的路径上-nbformat不是问题,但出于某种原因,我有一个过时的plotly安装,多么奇怪!一个新的升级修复了它,谢谢!嗨-你把我带到了正确的路径上-nbformat不是问题,但出于某种原因,我有一个过时的plotly安装,多么奇怪!一个新的升级修复了它,谢谢!