我正在使用python中的三个数据集,并且我计划制作一个corner plot,但我希望能够绘制条件均值,就像分位数选项显示here一样,但我不确定如何做到这一点,任何见解都会得到充分肯定。
编辑: 这是我的代码的一部分(假设每个文件都有相同的前缀,并提供了变量的数量)
truths = np.array([ 0.5, 1.4 ,2.0, 3.3, 2.6, 1.960])
labels = [ "$f$" ,"$a$" ,"$Ks$", "$Kb$" ,"$N$","$rho$"]
dimension = int(sys.argv[2])
#get the shape of walkers
test = np.genfromtxt( sys.argv[1] + str(0)+".csv" , dtype=float, delimiter=',')
print "\n\nWalkers : " , test.shape[0]
print "Walks : ", test.shape[1]
sampler = np.zeros( ( test.shape[0], test.shape[1] , dimension ) )
# read data
for i in range(0,dimension):
sampler[:,:,i] = np.genfromtxt( sys.argv[1] + str(i)+".csv" , dtype=float, delimiter=',')
#10 percent burnout
burn_out = int( math.ceil( 0.1 * test.shape[1]) )
print "burn out: ", burn_out
print "\n\n"
samples = sampler[:, burn_out :, :].reshape((-1, dimension))
fig = corner.corner(samples, labels=labels[0:dimension], truths=truths[0:dimension] , show_titles=True, title_kwargs={"fontsize": 12} )
fig.savefig("triangle.png")