python - 高斯分布的两个 Y 轴以及如何为分布着色
问题描述
我试图根据我的数据进行分配。所以,基本上我希望有线图并为每条线放置分布。到目前为止,我设法把这些放在一起。
import numpy as np
import scipy.stats as stats
import matplotlib.pyplot as plt
from matplotlib import cm
sns.set_theme(style="white")
data = ['N', 'O', 'P']
for x in data:
ax1 = plt.plot(x, data=df1)
ax2 = sns.distplot(df1[x], fit=norm, kde=False, norm_hist=False, bins=10, hist_kws=dict(alpha=0))
xticks = [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28]
ticklabels = ['0','2', '4', '6', '8', '10', '12', '14', '16', '18', '20', '22', '24', '26', '28']
plt.xticks(xticks, ticklabels)
plt.xlim(0,50)
plt.ylim(0,0.1)
#plt.yscale("log")
plt.legend()
plt.show()
这只会导致我:
有没有可能做出我上面提到的东西?我想做这样的事情:
*但点将是分布
谢谢!是
解决方案
推荐阅读
- apache-nifi - NiFi SelectHiveQL - 停止为传入请求提供服务
- perl - 以第一个元素的方式对哈希值进行排序 Perl
- javascript - 如何将 express/nodejs 代码从回调地狱转换为承诺
- node.js - Node-postgres 连接到 localhost 而不是 AWS Postgres 实例
- php - 可捕获的致命错误:类 mysqli 的对象无法在第 35 行的 C:\wamp64\www\web\index.php 中转换为字符串
- database - Like 运算符不可散列 - Teradata
- selenium - UnreachableBrowserException:与远程浏览器通信时出错。它可能已经死了,并且 Command 未能干净地关闭。强行破坏
- php - Laravel 的 deleteDirectory 忽略了保留标志
- android - Android上的Unity Sqlite本地数据库奇怪的字母
- json - 反序列化新的 Moodle 日志 Json 格式