Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -65,16 +65,13 @@ if max_val > mean_val > min_val:
|
|
| 65 |
ax.plot(x, y, color='royalblue', linewidth=2, label='Deviation Curve')
|
| 66 |
|
| 67 |
# Markers for Min, Mean, Max
|
| 68 |
-
ax.
|
| 69 |
-
ax.
|
| 70 |
-
ax.
|
| 71 |
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
offset =
|
| 75 |
-
ax.text(min_val, offset, f'Min\n{min_val} {unit}', color='blue', ha='right', va='bottom')
|
| 76 |
-
ax.text(mean_val, mean_pdf + offset, f'Mean\n{mean_val} {unit}', color='green', ha='center', va='bottom')
|
| 77 |
-
ax.text(max_val, offset, f'Max\n{max_val} {unit}', color='red', ha='left', va='bottom')
|
| 78 |
|
| 79 |
ax.set_title(f"{kpi_selected} - Std. Deviation Curve")
|
| 80 |
ax.set_xlabel(f"{kpi_selected} ({unit})")
|
|
@@ -103,3 +100,4 @@ if max_val > mean_val > min_val:
|
|
| 103 |
else:
|
| 104 |
st.warning("Please ensure that: Min < Mean < Max to generate a valid bell curve.")
|
| 105 |
|
|
|
|
|
|
| 65 |
ax.plot(x, y, color='royalblue', linewidth=2, label='Deviation Curve')
|
| 66 |
|
| 67 |
# Markers for Min, Mean, Max
|
| 68 |
+
ax.plot(min_val, min_pdf, 'o', color='blue')
|
| 69 |
+
ax.plot(mean_val, mean_pdf, 'o', color='green')
|
| 70 |
+
ax.plot(max_val, max_pdf, 'o', color='red')
|
| 71 |
|
| 72 |
+
ax.annotate(f'{min_val} {unit}', (min_val, min_pdf), textcoords="offset points", xytext=(-10,10), ha='center', color='blue')
|
| 73 |
+
ax.annotate(f'{mean_val} {unit}', (mean_val, mean_pdf), textcoords="offset points", xytext=(0,10), ha='center', color='green')
|
| 74 |
+
ax.annotate(f'{max_val} {unit}', (max_val, max_pdf), textcoords="offset points", xytext=(10,10), ha='center', color='red')
|
|
|
|
|
|
|
|
|
|
| 75 |
|
| 76 |
ax.set_title(f"{kpi_selected} - Std. Deviation Curve")
|
| 77 |
ax.set_xlabel(f"{kpi_selected} ({unit})")
|
|
|
|
| 100 |
else:
|
| 101 |
st.warning("Please ensure that: Min < Mean < Max to generate a valid bell curve.")
|
| 102 |
|
| 103 |
+
|