当前位置:网站首页>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()
边栏推荐
- 《卓有成效的管理者》读书笔记
- The digital economy has broken through the waves. Is Ltd a Web3.0 website with independent rights and interests?
- Yunxiaoduo software internal test distribution test platform description document
- Title 1093: character reverse order
- Analysis of grammar elements in turtle Library
- c语言——冒泡排序
- 嵌入式面试题(一:进程与线程)
- Web service connector: Servlet
- As3013 fire endurance test of cable distribution system
- Luogu [Beginner Level 4] array p1427 number game of small fish
猜你喜欢
[Jiudu OJ 07] folding basket
wib3.0 跨越,在跨越(ง •̀_•́)ง
c语言——冒泡排序
H3C firewall rbm+vrrp networking configuration
- [email protected]树莓派"/>
[email protected]树莓派
Rustdesk builds its own remote desktop relay server
B站刘二大人-数据集及数据加载 Lecture 8
IDEA 新UI使用
ArcGIS application foundation 4 thematic map making
The digital economy has broken through the waves. Is Ltd a Web3.0 website with independent rights and interests?
随机推荐
局域网同一个网段通信过程
J'ai un chaton.
Station B Liu Erden softmx classifier and MNIST implementation -structure 9
wib3.0 跨越,在跨越(ง •̀_•́)ง
[SQL Server Express Way] - authentification et création et gestion de comptes utilisateurs
Station B, Master Liu Er - dataset and data loading
HCIA review
B站刘二大人-线性回归 Pytorch
Winter 2021 pat class B problem solution (C language)
P2802 回家
HCIA复习
【论文代码】SML部分代码阅读
nodejs实现微博第三方登录
Station B Liu Erden - linear regression and gradient descent
How can large websites choose better virtual machine service providers?
清除浮动的方式
[Baiwen smart home] first day of the course_ Learn Embedded and understand the development mode of bare metal and RTOS
养了只小猫咪
What impact will frequent job hopping have on your career?
Baidu online AI competition - image processing challenge: the 8th program of handwriting erasure