79290574

Date: 2024-12-18 09:24:12
Score: 1
Natty:
Report link

It is easier to separate the drawing and the text annotation:

# Plot each line 
for i, y_week in enumerate(y):
    ax.plot(x, wins_array[i], zs=y_week, zdir='x', label=weeks[i])
    # Add shaded area below the line
    ax.bar(x, wins_array[i], zs=y_week, zdir='x', alpha=0.1)

# Add labels directly on the curves
for i in y:
    for j, k in zip(x, wins_array[i]):
        ax.text(i, j, k, f"{k}", color="red", fontsize=8, ha="center")

res

Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: rehaqds