当前位置:网站首页>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()
边栏推荐
猜你喜欢
从RepVgg到MobileOne,含mobileone的代码
[optimtool.unconstrained] unconstrained optimization toolbox
Keep on fighting! The city chain technology digital summit was grandly held in Chongqing
redis03——Redis的网络配置与心跳机制
【公开课预告】:视频质量评价基础与实践
Maidong Internet won the bid of Beijing life insurance
Enlightenment of maker thinking in Higher Education
How to use concurrentlinkedqueue as a cache queue
[ 每周译Go ] 《How to Code in Go》系列文章上线了!!
Word文档中标题前面的黑点如何去掉
随机推荐
迈动互联中标北京人寿保险
Analysis of maker education technology in the Internet Era
[public class preview]: basis and practice of video quality evaluation
Solve the problem of data disorder caused by slow asynchronous interface
ArcGIS 10.2.2 | solution to the failure of ArcGIS license server to start
关系型数据库
Shutter WebView example
股票开户流程是什么?使用同花顺手机炒股软件安全吗?
Which securities company is better to open an account? Is online account opening safe
Open3d surface normal vector calculation
Jerry's ad series MIDI function description [chapter]
迷失在Mysql的锁世界
How was MP3 born?
哈希表(Hash Tabel)
GTEST from ignorance to proficiency (3) what are test suite and test case
VS2019 C# release下断点调试
Jerry's ad series MIDI function description [chapter]
Jerry's ad series MIDI function description [chapter]
Exclusive interview of open source summer | new committer Xie Qijun of Apache iotdb community
淘宝商品评价api接口(item_review-获得淘宝商品评论API接口),天猫商品评论API接口