Spaces:
Runtime error
Runtime error
bug fix
Browse files
app.py
CHANGED
@@ -75,7 +75,7 @@ def generate_plot(df):
|
|
75 |
axs[0, 0].plot(df.loc[df['Group'] == '4', 'Date'], df.loc[df['Group'] == '4', 'sales'], color='grey')
|
76 |
axs[0, 0].plot(df.loc[df['Group'] == '4', 'Date'], df.loc[df['Group'] == '4', 'pred'], color = 'red')
|
77 |
axs[0, 0].set_title('Article Group 1')
|
78 |
-
|
79 |
|
80 |
|
81 |
axs[0, 1].plot(df.loc[df['Group'] == '7', 'Date'], df.loc[df['Group'] == '7', 'sales'], color='grey')
|
@@ -93,7 +93,6 @@ def generate_plot(df):
|
|
93 |
axs[1, 1].set_title('Article Group 4')
|
94 |
#axs[1, 1].set_xticklabels(['Start', 'Mid', 'End'], rotation=45)
|
95 |
|
96 |
-
plt.setp(axs.xaxis.get_majorticklabels(), rotation=45)
|
97 |
plt.tight_layout()
|
98 |
return fig, axs
|
99 |
|
|
|
75 |
axs[0, 0].plot(df.loc[df['Group'] == '4', 'Date'], df.loc[df['Group'] == '4', 'sales'], color='grey')
|
76 |
axs[0, 0].plot(df.loc[df['Group'] == '4', 'Date'], df.loc[df['Group'] == '4', 'pred'], color = 'red')
|
77 |
axs[0, 0].set_title('Article Group 1')
|
78 |
+
axs[0, 0].set_xticklabels(axs[0, 0].get_yticks(), rotation=45)
|
79 |
|
80 |
|
81 |
axs[0, 1].plot(df.loc[df['Group'] == '7', 'Date'], df.loc[df['Group'] == '7', 'sales'], color='grey')
|
|
|
93 |
axs[1, 1].set_title('Article Group 4')
|
94 |
#axs[1, 1].set_xticklabels(['Start', 'Mid', 'End'], rotation=45)
|
95 |
|
|
|
96 |
plt.tight_layout()
|
97 |
return fig, axs
|
98 |
|