python - 抑制 RainCloudplot 中未使用的区域 - Python
问题描述
我正在使用 PtitPrince 和 Seaborn 在 Python 上绘制 RainClouds,并且我的数据中有“间隙”(时间序列,事件不会发生),我想抑制它。
我的图是这样的:
但我希望它没有蓝色块,因为在这些时间不会发生任何事件:
我的脚本:
dx = "ThreatType"; dy = "InTrialHitTime"; dhue = "Collection_Group"; ort = "h"; pal = "husl"; sigma = .1
ax=pt.RainCloud(x = dx, y = dy, data = df, palette = pal, bw = sigma,
width_viol = .7, figsize = (12,7), orient = ort, alpha= .40, dodge = True, pointplot = True)
ax.set_yticklabels(['High Shock', 'Low Shock'])
ax.set_xlabel('Devil hit time')
解决方案
推荐阅读
- ios - 跟踪 ios 设备的振幅声音
- node.js - “发送后无法设置标题。” 通过角度获取数据时节点出错
- php - 如何修复:“Sensio\Bundle\FrameworkExtraBundle\Configuration\Route”已弃用
- airflow - Airflow - 如何重新加载运算符和插件
- sybase - Sybase表重组和索引重组的区别
- python - IndexError:for循环中的列表索引超出范围
- windows - Windows 10:添加了环境变量,但未使用“echo”打印
- arrays - 获取所有值为零的字节数组
- angular-ui-bootstrap - Bootstrap card-text 限制为四行
- xslt - 需要数字格式作为 dita ot epub 输出的 xhtml 文件的前缀