当前位置:网站首页>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()
边栏推荐
- H3C V7 switch configuration IRF
- P2802 go home
- B站刘二大人-反向传播
- SQLMAP使用教程(三)实战技巧二
- B站刘二大人-多元逻辑回归 Lecture 7
- Migrate Infones to stm32
- [email protected] raspberry pie
- Hongliao Technology: Liu qiangdong's "heavy hand"
- [Baiwen smart home] first day of the course_ Learn Embedded and understand the development mode of bare metal and RTOS
- Auto.js学习笔记17:基础监听事件和UI简单的点击事件操作
猜你喜欢
[SQL Server Express Way] - authentification et création et gestion de comptes utilisateurs
Clear floating mode
YYGH-11-定时统计
How Huawei routers configure static routes
Gtest之TEST宏的用法
(5) Explanation of yolo-v3 core source code (3)
Memory and stack related concepts
How to use the container reflection method encapsulated by thinkphp5.1 in business code
What preparations should be made for website server migration?
[untitled]
随机推荐
A complete collection of necessary learning websites for office programmers
H3C防火墙RBM+VRRP 组网配置
What preparations should be made for website server migration?
B站刘二大人-线性回归及梯度下降
[C language syntax] the difference between typedef struct and struct
Classes and objects (I) detailed explanation of this pointer
Sqlmap tutorial (III) practical skills II
Baidu online AI competition - image processing challenge: the 8th program of handwriting erasure
Go language -- language constants
Luogu [Beginner Level 4] array p1427 number game of small fish
B站刘二大人-反向传播
Report on the competition status and investment decision recommendations of Guangxi hospital industry in China from 2022 to 2028
Investment strategy discussion and market scale prediction report of China's solid state high power amplifier industry from 2022 to 2028
[string] palindrome string of codeup
B站刘二大人-Softmx分类器及MNIST实现-Lecture 9
网站进行服务器迁移前应做好哪些准备?
Query the standard text code corresponding to a work center (s) in the production order
[Jiudu OJ 08] simple search x
How to recover Huawei router's forgotten password
YYGH-11-定时统计