fix: 修复绘图数据看不清

This commit is contained in:
2025-12-21 16:19:10 +08:00
parent d54350a69b
commit 04fe771e8f

View File

@@ -27,9 +27,9 @@ def plot_line(
has_free = free_values is not None and len(free_values) > 0 has_free = free_values is not None and len(free_values) > 0
if has_free: if has_free:
fig, (ax1, ax2) = plt.subplots(2, 1, figsize=(8, 6), sharex=True) fig, (ax1, ax2) = plt.subplots(2, 1, figsize=(16, 6), sharex=True)
else: else:
fig, ax1 = plt.subplots(1, 1, figsize=(8, 4)) fig, ax1 = plt.subplots(1, 1, figsize=(16, 4))
ax2 = None ax2 = None
# ===== 普通额度 ===== # ===== 普通额度 =====
@@ -42,7 +42,7 @@ def plot_line(
ax1.grid(True) ax1.grid(True)
for i, (x, y) in enumerate(zip(times, normal_values)): for i, (x, y) in enumerate(zip(times, normal_values)):
dy = 8 if i == 0 or y >= normal_values[i - 1] else -12 dy = 8 if i != 0 or y < normal_values[i - 1] else -16
ax1.annotate( ax1.annotate(
f"{y}", f"{y}",