当前位置:网站首页>并列图的画法,多排多列
并列图的画法,多排多列
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()
边栏推荐
- Three or two things about the actual combat of OMS system
- Solve the problem of data disorder caused by slow asynchronous interface
- gtest从一无所知到熟练使用(3)什么是test suite和test case
- For MySQL= No data equal to null can be found. Solution
- 创客思维在高等教育中的启迪作用
- Golang面试整理 三 简历如何书写
- 解析互联网时代的创客教育技术
- Maidong Internet won the bid of Beijing life insurance
- WGCNA analysis basic tutorial summary
- Shutter WebView example
猜你喜欢
【微信小程序】协同工作与发布
Super detailed tutorial, an introduction to istio Architecture Principle and practical application
每日一题-LeetCode1200-最小绝对差-数组-排序
GTEST from ignorance to proficiency (3) what are test suite and test case
[weekly translation go] how to code in go series articles are online!!
ArcGIS 10.2.2 | solution to the failure of ArcGIS license server to start
[optimtool.unconstrained] unconstrained optimization toolbox
[C language] deep understanding of symbols
How was MP3 born?
How was MP3 born?
随机推荐
Cloudcompare & open3d DBSCAN clustering (non plug-in)
Can be displayed in CAD but not displayed in print
Redis bloom filter
gtest从一无所知到熟练运用(1)gtest安装
CAD中能显示打印不显示
淘宝商品评价api接口(item_review-获得淘宝商品评论API接口),天猫商品评论API接口
minidom 模塊寫入和解析 XML
关系型数据库
Acwing 2022 daily question
Exclusive interview of open source summer | new committer Xie Qijun of Apache iotdb community
How much is the minimum stock account opening commission? Is it safe to open an account online
In the release version, the random white screen does not display the content after opening the shutter
Shutter WebView example
刘锦程荣获2022年度中国电商行业创新人物奖
MP3是如何诞生的?
Go language loop statement (3 in Lesson 10)
Application practice | Shuhai supply chain construction of data center based on Apache Doris
Minidom module writes and parses XML
Golang interview finishing three resumes how to write
Arcgis 10.2.2 | arcgis license server无法启动的解决办法