GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — python_uitls/AnaMap/main.py at master · clwater/python_uitls

Expand file tree

/

main.py

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
77 lines (59 loc) · 1.99 KB
/

main.py

Copy path

File metadata and controls

77 lines (59 loc) · 1.99 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/usr/bin/env python3
# -*- coding: utf-8 -*-'
import matplotlib
from matplotlib.font_manager import FontProperties
matplotlib.use('TkAgg')
myfont = FontProperties(fname='/Library/Fonts/huawenfangsong.ttf')
matplotlib.rcParams['axes.unicode_minus']=False
import matplotlib.pyplot as plt
def main():
import tushare as ts
data = ts.get_hist_data('sz50', start='2016-11-01', end='2016-12-30')
data = data.sort_index()
# # 一个基本的折线图
x = range(len(data))
# 收盘价的折线图
plt.plot(x, data['close'])
plt.title(u'中文' , fontproperties=myfont)
#
# x = range(len(data))
# plt.plot(x, data['close'])
# plt.plot(x, data['high'])
#
# # 设置图形大小和线条颜色
# x = range(len(data))
# plt.figure(figsize=(10, 5))
# plt.plot(x, data['close'])
# plt.plot(x, data['high'])
# x = range(len(data))
# plt.figure(figsize=(10, 5))
# plt.plot(x, data['close'])
# plt.plot(x, data['high'], color='r')
# plt.title("中文")
# from matplotlib.pylab import datestr2num
# x = range(len(data))
# x_date = [datestr2num(i) for i in data.index]
# plt.figure(figsize=(10, 5))
# plt.title("上证50指数历史最高价、收盘价走势折线图")
# plt.xlabel("时间")
# # plt.xticks(x,[i for i in data.index])
# plt.ylabel("指数")
# plt.plot_date(x_date, data['close'], '-', label="收盘价")
# plt.plot_date(x_date, data['high'], '-', color='r', label="开盘价")
# plt.legend()
# x = range(len(data))
# x_date = [datestr2num(i) for i in data.index]
# plt.style.use('ggplot')
# plt.figure(figsize=(10, 5))
# plt.title("image")
# plt.xlabel("time")
# plt.xticks(rotation=45)
# plt.ylabel("index")
# plt.plot_date(x_date, data['close'], '-', label="sp")
# plt.plot_date(x_date, data['high'], '-', label="max")
# plt.legend()
# plt.grid(True)
plt.show()
plt.savefig('test2.jpg')
if __name__ == '__main__':
main()
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.