Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -88,11 +88,11 @@ def app():
|
|
| 88 |
elif plot["type"] == "bar":
|
| 89 |
# Bar Plot: Pizzas sold per hour of day (No sorting)
|
| 90 |
hourly_var = df.groupby(plot["x"])[plot["y"]].sum().reset_index()
|
| 91 |
-
sns.barplot(data=hourly_var, x=plot["x"], y=plot["y"], ax=ax, palette="rocket")
|
| 92 |
|
| 93 |
-
#
|
| 94 |
-
ax.set_xticks(
|
| 95 |
-
ax.tick_params(axis='x', rotation=0)
|
| 96 |
|
| 97 |
elif plot["type"] == "count":
|
| 98 |
# Count Plot: Category or Size breakdown
|
|
|
|
| 88 |
elif plot["type"] == "bar":
|
| 89 |
# Bar Plot: Pizzas sold per hour of day (No sorting)
|
| 90 |
hourly_var = df.groupby(plot["x"])[plot["y"]].sum().reset_index()
|
| 91 |
+
sns.barplot(data=hourly_var, x=plot["x"], y=plot["y"], ax=ax, palette="rocket", order=np.arange(24))
|
| 92 |
|
| 93 |
+
# Set explicit ticks from 0 to 23 for clarity
|
| 94 |
+
ax.set_xticks(np.arange(0, 24, 2)) # Show every other tick for less clutter
|
| 95 |
+
ax.tick_params(axis='x', rotation=0)
|
| 96 |
|
| 97 |
elif plot["type"] == "count":
|
| 98 |
# Count Plot: Category or Size breakdown
|