python - 为什么 Matplotlib/seaborn alpha 参数不采用列表或数组?
问题描述
在 matplotlib 和 seaborn 中,大小、颜色、样式等参数接受列表/熊猫列。 alpha 不将 list/array/column 作为参数是否有任何具体原因。虽然可以通过发送预先映射的颜色来解决问题,但是仅仅能够做这样的事情会好得多
sns.scatterplot(x='SepalLengthCm',y='SepalWidthCm',data=df,alpha='Species')
解决方案
推荐阅读
- powershell - 尝试/捕获或错误变量并使用
- c# - Xamarin WPF - 按钮按下事件不起作用?
- arrays - 是否有 Google 表格功能允许您对具有相似字段但条件不同的不同数据集进行多次查询?
- build - 为什么 ejabberd 想在 /home 中创建 erlang cookie?#crash:权限问题
- html - 如何在 Wordpress 中格式化视频的窗口大小?
- visual-studio-code - 无法远程 SSH 到 VSCode 上的 Windows 主机
- stream - 如何使用流但仍保留数据而不偏移
- python - 使用 pandas 的 lambda 函数的语法错误
- java - 内容协商。请求、响应支持 JSON 和 XML
- r - {rlang} 的'curly-curly' 操作符 `{{` 是如何实现的?