当前位置:网站首页>The drawing method of side-by-side diagram, multi row and multi column
The drawing method of side-by-side diagram, multi row and multi column
2022-07-04 21:55:00 【Cochlear notes】
import matplotlib.pyplot as plt
plt.style.use('seaborn-whitegrid')
plt.rcParams['font.sans-serif']=['SimHei']
plt.rcParams['axes.unicode_minus'] = False
fig = plt.figure(figsize=(70, 60),dpi=60)
for i in range(1,42):
ax = fig.add_subplot(7,6,i)
ax.spines['bottom'].set_linewidth('1.0')# Set the border line width to 2.0
ax.spines['bottom'].set_color('black')
ax.spines['top'].set_linewidth('1.0')# Set the border line width to 2.0
ax.spines['top'].set_color('black')
ax.spines['right'].set_linewidth('1.0')# Set the border line width to 2.0
ax.spines['right'].set_color('black')
ax.spines['left'].set_linewidth('1.0')# Set the border line width to 2.0
ax.spines['left'].set_color('black')
plt.xticks(fontsize = 20)
plt.yticks(fontsize = 20)
plt.scatter(data_std_all[data_std_all['firm'] == i]['year'], data_std_all[data_std_all['firm'] == i]['tfpch'], c='black', edgecolors='black')
plt.plot(data_std_all[data_std_all['firm'] == i]['year'], data_std_all[data_std_all['firm'] == i]['y_forecast'],color='black',linestyle = '-',linewidth=2, markersize=12)
if len(data_std_all[(data_std_all['firm'] == i)&(data_std_all['group'] == 1)]['year']) !=0:
plt.plot([data_std_all[(data_std_all['firm'] == i)&(data_std_all['group'] == 1)]['year'].iloc[0],data_std_all[(data_std_all['firm'] == i)&(data_std_all['group'] == 1)]['year'].iloc[0]],[-2.5,2.5],
color='black',linestyle = '-.',linewidth=2, markersize=12)
plt.ylim(-3, 3)
plt.xlim(2009, 2022)
plt.xticks(size=30)
plt.yticks(size=30)
plt.title(data_std_all[data_std_all['firm'] == i]['area'].iloc[0],size=30)
plt.show()
边栏推荐
- El tree combined with El table, tree adding and modifying operations
- Go语言循环语句(第10课中3)
- 股票开户佣金最低多少,炒股开户佣金最低网上开户安全吗
- MYSQL 用!=查询不出等于null的数据,解决办法
- EhLib 数据库记录的下拉选择
- Delphi SOAP WebService 服务器端多个 SoapDataModule 实现相同的接口方法,接口继承
- Jerry's ad series MIDI function description [chapter]
- 做BI开发,为什么一定要熟悉行业和企业业务?
- Flutter TextField示例
- [weekly translation go] how to code in go series articles are online!!
猜你喜欢

Shutter textfield example

How to remove the black dot in front of the title in word document

Master the use of auto analyze in data warehouse

【活动早知道】LiveVideoStack近期活动一览

解析互联网时代的创客教育技术

Lambdaquerywrapper usage

GTEST from ignorance to proficiency (3) what are test suite and test case

Redis03 - network configuration and heartbeat mechanism of redis

【C语言】符号的深度理解

如何借助自动化工具落地DevOps
随机推荐
Golang interview finishing three resumes how to write
Sorting and sharing of selected papers, systems and applications related to the most comprehensive mixed expert (MOE) model in history
gtest从一无所知到熟练使用(3)什么是test suite和test case
Bookmark
From repvgg to mobileone, including mobileone code
Arcgis 10.2.2 | arcgis license server无法启动的解决办法
Analyzing the maker space contained in steam Education
minidom 模塊寫入和解析 XML
TCP shakes hands three times and waves four times. Do you really understand?
改善机器视觉系统的方法
Jerry's ad series MIDI function description [chapter]
巅峰不止,继续奋斗!城链科技数字峰会于重庆隆重举行
Kubeadm初始化报错:[ERROR CRI]: container runtime is not running
什么是商业智能(BI),就看这篇文章足够了
Application practice | Shuhai supply chain construction of data center based on Apache Doris
解析steam教育中蕴含的众创空间
Jerry's ad series MIDI function description [chapter]
Daily question-leetcode556-next larger element iii-string-double pointer-next_ permutation
Liu Jincheng won the 2022 China e-commerce industry innovation Figure Award
Exclusive interview of open source summer | new committer Xie Qijun of Apache iotdb community