python - Plt.Scatter at seaborn:错误:系列的真值不明确。使用 a.empty、a.bool()、a.item()、a.any() 或 a.all()
问题描述
当我尝试绘制我的图形时,我正在寻找解决我的问题的解决方案:“系列的真值是模棱两可的。使用 a.empty、a.bool()、a.item()、a.any( ) 或 a.all()。” 例如,如果我删除 data_t_quali['TOR'] 并只输入 'TOR'(正如 seaborn 网站上所说的那样),那么我会得到空图形。
g = sns.FacetGrid(data_t_quali1, col='Reussie',col_order=['Reprise en main reussie','Echec de la reprise en main'],hue='Age',hue_order=[20,30,40,50,60 ],size=6,aspect=1.2,palette=sns.light_palette('navy', 4)[1:])
g.map(plt.scatter,data_t_quali1['NombreFixation'],data_t_quali1['TOR'],alpha=0.9, edgecolor='white', linewidth=2, s=300)
fig = g.fig
fig.subplots_adjust(top=0.79, wspace=0.3)
fig.suptitle('Time to take over control (TOR) in fonction of the fixation numbers 2 minutes before the regaining control of the vehicle', fontsize=20, fontweight='bold')
g.add_legend(title='Age du conducteur')
解决方案
推荐阅读
- python - 如何使用openpyxl将qtablewidget数据保存到excel文件中
- css - vue类绑定对象的变量
- python - 文本分析预测后如何结合 X_test、y 测试和 y 预测?
- javascript - Reactnative 错误,无法安装应用程序
- java - 如何为 Pivotal Cloud Foundry 托管的 JSP/Servlet 应用程序从 SiteMinder 会话注销?
- sql-server - 在 sql server 中的 sql alchemy 中使用 CTE 中的子查询
- java - IOException:将文件上传到服务器时流关闭
- powershell - 访问 Citrix NetScaler 背后的 Web 服务
- python - Clojure 到 Python:str 中的可选元素,如 fn
- oracle - 甚至为空值存储过程显示数据