当前位置:网站首页>并列图的画法,多排多列
并列图的画法,多排多列
2022-07-04 21:14:00 【小蜗笔记】
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')#设置边框线宽为2.0
ax.spines['bottom'].set_color('black')
ax.spines['top'].set_linewidth('1.0')#设置边框线宽为2.0
ax.spines['top'].set_color('black')
ax.spines['right'].set_linewidth('1.0')#设置边框线宽为2.0
ax.spines['right'].set_color('black')
ax.spines['left'].set_linewidth('1.0')#设置边框线宽为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()
边栏推荐
- How is the entered query SQL statement executed?
- Use of redis publish subscription
- Master the use of auto analyze in data warehouse
- 每日一题-LeetCode556-下一个更大元素III-字符串-双指针-next_permutation
- Liu Jincheng won the 2022 China e-commerce industry innovation Figure Award
- 股票开户佣金最低多少,炒股开户佣金最低网上开户安全吗
- Analysis of maker education technology in the Internet Era
- Shutter textfield example
- Redis transaction
- 旋变串判断
猜你喜欢
How was MP3 born?
案例分享|金融业数据运营运维一体化建设
OMS系统实战的三两事
CloudCompare&Open3D DBSCAN聚类(非插件式)
解读创客教育中的各类智能化组织发展
Lambdaquerywrapper usage
Methods of improving machine vision system
Super detailed tutorial, an introduction to istio Architecture Principle and practical application
Can be displayed in CAD but not displayed in print
[ 每周译Go ] 《How to Code in Go》系列文章上线了!!
随机推荐
Lambdaquerywrapper usage
刘锦程荣获2022年度中国电商行业创新人物奖
Jerry's ad series MIDI function description [chapter]
MongoDB中的索引操作总结
奋斗正当时,城链科技战略峰会广州站圆满召开
Difference between ApplicationContext and beanfactory (MS)
一文掌握数仓中auto analyze的使用
Maya lamp modeling
旋变串判断
Super detailed tutorial, an introduction to istio Architecture Principle and practical application
Jerry's ad series MIDI function description [chapter]
解读创客教育中的各类智能化组织发展
[public class preview]: basis and practice of video quality evaluation
Word文档中标题前面的黑点如何去掉
解决异步接口慢导致的数据错乱问题
学习突围3 - 关于精力
Jerry's ad series MIDI function description [chapter]
输入的查询SQL语句,是如何执行的?
Jerry's ad series MIDI function description [chapter]
WGCNA analysis basic tutorial summary