Spaces:
Sleeping
Sleeping
Update chart_generation.py
Browse files- chart_generation.py +4 -1
chart_generation.py
CHANGED
@@ -18,7 +18,10 @@ def create_bar_plot(file, x_values, y_values):
|
|
18 |
plt.ylabel('Count')
|
19 |
else:
|
20 |
count_df = df.groupby(['Type', 'Simple_Source']).size().unstack(fill_value=0)
|
21 |
-
fig =
|
|
|
|
|
|
|
22 |
|
23 |
plt.legend(title='Shop', bbox_to_anchor=(1.05, 1), loc='upper left')
|
24 |
|
|
|
18 |
plt.ylabel('Count')
|
19 |
else:
|
20 |
count_df = df.groupby(['Type', 'Simple_Source']).size().unstack(fill_value=0)
|
21 |
+
fig, ax = plt.subplots(figsize=(10, 7))
|
22 |
+
|
23 |
+
count_df.plot(kind='bar', stacked=True, ax=ax)
|
24 |
+
|
25 |
|
26 |
plt.legend(title='Shop', bbox_to_anchor=(1.05, 1), loc='upper left')
|
27 |
|