当前位置:网站首页>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()
边栏推荐
猜你喜欢
Case sharing | integrated construction of data operation and maintenance in the financial industry
QT - double buffer plot
gtest从一无所知到熟练使用(3)什么是test suite和test case
Jerry's ad series MIDI function description [chapter]
一文掌握数仓中auto analyze的使用
[ 每周译Go ] 《How to Code in Go》系列文章上线了!!
【C語言】符號的深度理解
Cloudcompare & open3d DBSCAN clustering (non plug-in)
Flutter TextField示例
QT—绘制其他问题
随机推荐
[leetcode] 17. Letter combination of telephone number
vim 从嫌弃到依赖(23)——最后的闲扯
Case sharing | integrated construction of data operation and maintenance in the financial industry
面试官:说说XSS攻击是什么?
ArcGIS 10.2.2 | solution to the failure of ArcGIS license server to start
CloudCompare&Open3D DBSCAN聚类(非插件式)
【LeetCode】17、电话号码的字母组合
AcWing 2022 每日一题
做BI开发,为什么一定要熟悉行业和企业业务?
一文掌握数仓中auto analyze的使用
QT - double buffer plot
Delphi soap WebService server-side multiple soapdatamodules implement the same interface method, interface inheritance
网上开户哪家证券公司佣金最低,我要开户,网上开户安全吗
Delphi SOAP WebService 服务器端多个 SoapDataModule 实现相同的接口方法,接口继承
Acwing 2022 daily question
Master the use of auto analyze in data warehouse
电话加密,中间4为****代替
Open3D 曲面法向量计算
bizchart+slider实现分组柱状图
SolidWorks工程图添加材料明细表的操作