docster99 commited on
Commit
3395ccd
·
verified ·
1 Parent(s): 75582a8

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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
- # Ensure all 24 hours are visible and readable
94
- ax.set_xticks(hourly_var[plot["x"]].unique())
95
- ax.tick_params(axis='x', rotation=0) # No rotation needed if using a wide enough figure
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