当前位置:网站首页>Commodity price visualization
Commodity price visualization
2022-07-06 05:58:00 【Twenty four bridges_】
import numpy as np
import matplotlib.pyplot as plt
plt.rcParams['font.sans-serif'] = ['SimHei']
plt.rcParams['axes.unicode_minus'] = False
with open('rb2010.csv', 'r', encoding='utf-8') as f:
file = f.readlines()[1:]
date = [i.strip().split(',')[0] for i in file]
settle = [int(i.strip().split(',')[5]) for i in file]
plt.grid(axis='both', color='k', linestyle='--', linewidth=1)
plt.xticks([i for i in range(len(date)) if i % 10 == 0], [i[-4:] for i in date[::10]], rotation=-30)
plt.yticks(np.arange(3200, 3801, 100))
plt.xlabel('2020 March to August ')
plt.ylabel(' Price ( element )')
plt.title(' Rebar futures trend chart ')
plt.plot(date, settle, linestyle='-', color='red', linewidth=1)
plt.savefig('rb2010p3.png')
plt.show()边栏推荐
- Market development prospect and investment risk assessment report of China's humidity sensor industry from 2022 to 2028
- Jushan database appears again in the gold fair to jointly build a new era of digital economy
- Redis message queue
- B站刘二大人-线性回归 Pytorch
- [untitled]
- IPv6 comprehensive experiment
- 養了只小猫咪
- Winter 2021 pat class B problem solution (C language)
- 进程和线程
- 公司视频加速播放
猜你喜欢
随机推荐
误差的基本知识
養了只小猫咪
【SQL server速成之路】——身份驗證及建立和管理用戶賬戶
A master in the field of software architecture -- Reading Notes of the beauty of Architecture
Web服务连接器:Servlet
LTE CSFB process
Accélération de la lecture vidéo de l'entreprise
H3C S5820V2_ Upgrade method after stacking IRF2 of 5830v2 switch
c语言——冒泡排序
[leetcode] day96 - the first unique character & ransom letter & letter ectopic word
HCIA复习
The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
《卓有成效的管理者》读书笔记
公司视频加速播放
Li Chuang EDA learning notes 12: common PCB board layout constraint principles
ArcGIS application foundation 4 thematic map making
B站刘二大人-线性回归 Pytorch
Configuring OSPF GR features for Huawei devices
H3C V7 switch configuration IRF
Arrays and collections








