Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ import warnings
|
|
6 |
warnings.filterwarnings(action='ignore', category=UserWarning)
|
7 |
|
8 |
# 设置中文字体和编码
|
9 |
-
plt.rcParams['font.sans-serif'] = ['
|
10 |
plt.rcParams['axes.unicode_minus'] = False # 设置正常显示字符
|
11 |
|
12 |
def process_file(file):
|
@@ -58,7 +58,7 @@ def generate_output(file, column1, column2, choice, bins):
|
|
58 |
# 绘制分段柱形图
|
59 |
counts.plot(kind='bar')
|
60 |
# 设置 x 轴刻度标签横向显示
|
61 |
-
plt.xticks(rotation
|
62 |
plt.xlabel(column1, fontsize=12)
|
63 |
plt.ylabel(column2, fontsize=12)
|
64 |
# plt.legend(['不患病', '患病'])
|
|
|
6 |
warnings.filterwarnings(action='ignore', category=UserWarning)
|
7 |
|
8 |
# 设置中文字体和编码
|
9 |
+
plt.rcParams['font.sans-serif'] = ['Microsoft YaHei UI'] # 选择合适的中文字体
|
10 |
plt.rcParams['axes.unicode_minus'] = False # 设置正常显示字符
|
11 |
|
12 |
def process_file(file):
|
|
|
58 |
# 绘制分段柱形图
|
59 |
counts.plot(kind='bar')
|
60 |
# 设置 x 轴刻度标签横向显示
|
61 |
+
plt.xticks(rotation=-30)
|
62 |
plt.xlabel(column1, fontsize=12)
|
63 |
plt.ylabel(column2, fontsize=12)
|
64 |
# plt.legend(['不患病', '患病'])
|