2024-09-30 08:33:32 发布
网友
我做了PDF,这是下面的历史代码
plt.figure() values1,bins1,_ = plt.hist(np.log10(fakeclusterlum),bins=20) plt.hist(np.log10(bigclusterlum151mh),alpha = .5,bins = bins1)
但我不知道怎么把它画成CDF?我要画出假ClusterLum和bigclusterlum151mh点。如果这是有道理的如果它不,我道歉,我有点初学者!在
pyplot.hist有一个参数
cumulative : bool, optional If True, then a histogram is computed where each bin gives the counts in that bin plus all bins for smaller values. The last bin gives the total number of datapoints. Default: False
cumulative
因此使用
plt.hist(..., cumulative=True)
绘制累积直方图。在
pyplot.hist有一个参数
因此使用
绘制累积直方图。在
相关问题 更多 >
编程相关推荐