Skip to content

Commit 4819c54

Browse files
committed
update
1 parent 1182e39 commit 4819c54

294 files changed

Lines changed: 370941 additions & 427 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.idea/encodings.xml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/workspace.xml

Lines changed: 339 additions & 401 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

matplp/jieba/cipin.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,13 @@
1414

1515
# seg_list = jieba.cut(text, cut_all=False) #精确模式(默认是精确模式)
1616
seg_list = jieba.cut(text) # 精确模式(默认是精确模式)
17+
for va in seg_list:
18+
print(va)
19+
print(seg_list)
1720
print("[精确模式]: ", " ".join(seg_list))
1821

19-
# seg_list2 = jieba.cut(text, cut_all=True) #全模式
20-
# print("[全模式]: ", " ".join(seg_list2))
22+
seg_list2 = jieba.cut(text, cut_all=True) #全模式
23+
print("[全模式]: ", " ".join(seg_list2))
2124

2225
seg_list3 = jieba.cut_for_search(text) #搜索引擎模式
2326
print("[搜索引擎模式]: "," ".join(seg_list3))

matplp/jieba/ciyun2.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
text = " ".join(ags)
1111
text="快速分析—持久储存 细致图表—比分数告诉你的更多 分析报告—用数据告诉你的状态 错题题库—精准拍搜 人工智能—回归预测 移动pc—随时随地"
1212
print(text)
13+
text=['快速','gagdagda','gadgdag','aaaa','ggggg','hrrrrr','grgrgr','grgrg']
14+
text=' '.join(text)
1315
#backgroud_Image = plt.imread('tt.jpg')#如果需要个性化词云
1416
wc = WordCloud(background_color="white",
1517
width=1500, height=1200,

matplp/jieba/image/jishu.png

66.7 KB
Loading

matplp/jieba/zzz.png

-238 KB
Loading

matplp/matplotlib/bingzhuang.py

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# -*- coding: utf-8 -*
2+
3+
from matplotlib.font_manager import FontManager, FontProperties
4+
import matplotlib as mpl
5+
import matplotlib.pyplot as plt
6+
import matplotlib
7+
matplotlib.rcParams['font.sans-serif'] = ['SimHei']
8+
matplotlib.rcParams['axes.unicode_minus'] = False
9+
10+
# 使用Mac系统自带的中问字体
11+
# def getChineseFont():
12+
# return FontProperties(fname='/System/Library/Fonts/STHeiti Medium.ttc')
13+
14+
15+
# 设置图片大小
16+
# plt.figure(figsize=(9,6))
17+
label = u'超载', u'船员责任心不强', u'船员驾驶技术太差', u'通航环境差', u'海事、港航监管不到位', u'船舶过于老旧', u'冒险航行' # 各类别标签
18+
color = 'red', 'orange', 'yellow', 'green', 'blue', 'gray', 'goldenrod' # 各类别颜色
19+
size = [34, 5, 6, 14, 1, 10, 23] # 各类别占比
20+
explode = (0.2, 0, 0, 0, 0, 0, 0) # 各类别的偏移半径
21+
22+
# plt.subplot(2,3,1)
23+
# 绘制饼状图
24+
pie = plt.pie(size, colors=color, explode=explode, labels=label, shadow=True, autopct='%1.1f%%')
25+
# 饼状图呈正圆
26+
for font in pie[1]:
27+
28+
font.set_size(8)
29+
for digit in pie[2]:
30+
digit.set_size(8)
31+
32+
plt.axis('equal')
33+
plt.title(u'你认为砂石船发生事故的主要原因在于', fontsize=12)
34+
35+
plt.legend( loc=0, bbox_to_anchor=(0.82, 1)) # 图例
36+
# 设置legend的字体大小
37+
leg = plt.gca().get_legend()
38+
ltext = leg.get_texts()
39+
plt.setp(ltext, fontsize=6)
40+
41+
# 显示图
42+
plt.show()

pyecharts2/地图/DD.csv

Lines changed: 549 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)