fix: 修复绘图数据看不清
This commit is contained in:
@@ -27,9 +27,9 @@ def plot_line(
|
||||
has_free = free_values is not None and len(free_values) > 0
|
||||
|
||||
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:
|
||||
fig, ax1 = plt.subplots(1, 1, figsize=(8, 4))
|
||||
fig, ax1 = plt.subplots(1, 1, figsize=(16, 4))
|
||||
ax2 = None
|
||||
|
||||
# ===== 普通额度 =====
|
||||
@@ -42,7 +42,7 @@ def plot_line(
|
||||
ax1.grid(True)
|
||||
|
||||
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(
|
||||
f"{y}",
|
||||
|
||||
Reference in New Issue
Block a user