当前位置:网站首页>Representation of confidence interval
Representation of confidence interval
2022-07-04 21:55:00 【Cochlear notes】
err_inter = result.conf_int()
# The center of the confidence interval
err_mean = (err_inter[1]+err_inter[0])/2
# The length of the confidence interval
err_long = (err_inter[1]-err_inter[0])/2
# Confidence interval mapping
import matplotlib.pyplot as plt
from scipy import stats
import numpy as np
plt.style.use('seaborn-whitegrid')
fig, ax = plt.subplots(figsize=(50, 20),dpi=60)
ax.spines['bottom'].set_linewidth('2.0')# Set the border line width to 2.0
ax.spines['bottom'].set_color('black')
ax.spines['top'].set_linewidth('2.0')# Set the border line width to 2.0
ax.spines['top'].set_color('black')
ax.spines['right'].set_linewidth('2.0')# Set the border line width to 2.0
ax.spines['right'].set_color('black')
ax.spines['left'].set_linewidth('2.0')# Set the border line width to 2.0
ax.spines['left'].set_color('black')
plt.xticks(fontsize = 50)
plt.yticks(fontsize = 50)
for i in range(1,len(err_inter)):
ax.errorbar(i-10,err_mean[i] , yerr=err_long[i],
fmt='.', markersize=10, capsize=15, color='black')
xticks = [-9,-8, -7, -6, -5, -4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11]
xticklabes =['-9','-8','-7','-6','-5','-4','-3','-2','-1','0','1','2','3','4','5','6','7','8','9','10','11']
plt.xticks(xticks,xticklabes,size=50)
yticks = [-2,-1,0,1,2,3,4,5]
yticklabes =['-2','-1','0','1','2','3','4','5']
ax.plot([-9.5,11.5],[0,0], color='black',linestyle = '--',linewidth=2, markersize=12)
plt.xticks(xticks,xticklabes,size=50)
ax.set_ylim(-2.5, 5.5)
ax.set_xlim(-9.5, 11.5)
#ax.fill_betweenx([1, 0], facecolor='lightgrey', alpha=0.3)
#ax.legend(loc='best', fontsize=11, framealpha=1, frameon=True)
#ax.set_xticklabels()
#ax.set_ticklabels()
#ax.set_yticklabels(labels=labels)
ax.set_xlabel('time', fontsize=50)
ax.set_ylabel('coefficient', fontsize=50)
#ax.yaxis.set_major_formatter(plt.NullFormatter())
#fig.tight_layout();
#plt.show()
#plt.savefig(r'C:\Users\sc35131\Desktop\wangyao\Cell_consistence_alogrithm\picture9\\'+'1234',bbox_inches = 'tight',pad_inches = 0,dpi =350)
plt.savefig(' Parallel trend test .png')
边栏推荐
- TCP三次握手,四次挥手,你真的了解吗?
- Analyzing the maker space contained in steam Education
- MP3是如何诞生的?
- vim 从嫌弃到依赖(23)——最后的闲扯
- Redis 排查大 key 的3种方法,优化必备
- gtest从一无所知到熟练运用(1)gtest安装
- Jerry's ad series MIDI function description [chapter]
- Bizchart+slider to realize grouping histogram
- [public class preview]: basis and practice of video quality evaluation
- flink1.13 sql基础语法(一)DDL、DML
猜你喜欢
GTEST from ignorance to proficiency (3) what are test suite and test case
Maidong Internet won the bid of Beijing life insurance
Keep on fighting! The city chain technology digital summit was grandly held in Chongqing
From repvgg to mobileone, including mobileone code
How was MP3 born?
[C language] deep understanding of symbols
做BI开发,为什么一定要熟悉行业和企业业务?
At the right time, the Guangzhou station of the city chain science and Technology Strategy Summit was successfully held
什么是商业智能(BI),就看这篇文章足够了
[early knowledge of activities] list of recent activities of livevideostack
随机推荐
el-tree结合el-table,树形添加修改操作
历史最全混合专家(MOE)模型相关精选论文、系统、应用整理分享
TCP协议三次握手过程
Use of class methods and class variables
Which securities company is better to open an account? Is online account opening safe
Go语言循环语句(第10课中3)
电话加密,中间4为****代替
【LeetCode】17、电话号码的字母组合
Solve the problem of data disorder caused by slow asynchronous interface
El tree combined with El table, tree adding and modifying operations
Flink1.13 SQL basic syntax (I) DDL, DML
GTEST from ignorance to skillful use (1) GTEST installation
Shutter textfield example
挖财学院股票开户安全吗?开户只能在挖财开户嘛?
Cloudcompare & open3d DBSCAN clustering (non plug-in)
解析steam教育中蕴含的众创空间
开源之夏专访|Apache IoTDB社区 新晋Committer谢其骏
Super detailed tutorial, an introduction to istio Architecture Principle and practical application
Liu Jincheng won the 2022 China e-commerce industry innovation Figure Award
bizchart+slider实现分组柱状图