leuschnm commited on
Commit
b7eeaa3
·
1 Parent(s): c46ec53
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -75,24 +75,25 @@ 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
- axs[0, 0].set_xticklabels(axs[0, 0].get_xticks(), rotation=45)
79
 
80
 
81
  axs[0, 1].plot(df.loc[df['Group'] == '7', 'Date'], df.loc[df['Group'] == '7', 'sales'], color='grey')
82
  axs[0, 1].plot(df.loc[df['Group'] == '7', 'Date'], df.loc[df['Group'] == '4', 'pred'], color = 'red')
83
  axs[0, 1].set_title('Article Group 2')
84
- axs[0, 1].set_xticklabels(['Start', 'Mid', 'End'], rotation=45)
85
 
86
  axs[1, 0].plot(df.loc[df['Group'] == '1', 'Date'], df.loc[df['Group'] == '1', 'sales'], color='grey')
87
  axs[1, 0].plot(df.loc[df['Group'] == '1', 'Date'], df.loc[df['Group'] == '4', 'pred'], color = 'red')
88
  axs[1, 0].set_title('Article Group 3')
89
- axs[1, 0].set_xticklabels(['Start', 'Mid', 'End'], rotation=45)
90
 
91
  axs[1, 1].plot(df.loc[df['Group'] == '6', 'Date'], df.loc[df['Group'] == '6', 'sales'], color='grey')
92
  axs[1, 1].plot(df.loc[df['Group'] == '6', 'Date'], df.loc[df['Group'] == '4', 'pred'], color = 'red')
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
 
 
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_xticks(), rotation=45)
79
 
80
 
81
  axs[0, 1].plot(df.loc[df['Group'] == '7', 'Date'], df.loc[df['Group'] == '7', 'sales'], color='grey')
82
  axs[0, 1].plot(df.loc[df['Group'] == '7', 'Date'], df.loc[df['Group'] == '4', 'pred'], color = 'red')
83
  axs[0, 1].set_title('Article Group 2')
84
+ #axs[0, 1].set_xticklabels(['Start', 'Mid', 'End'], rotation=45)
85
 
86
  axs[1, 0].plot(df.loc[df['Group'] == '1', 'Date'], df.loc[df['Group'] == '1', 'sales'], color='grey')
87
  axs[1, 0].plot(df.loc[df['Group'] == '1', 'Date'], df.loc[df['Group'] == '4', 'pred'], color = 'red')
88
  axs[1, 0].set_title('Article Group 3')
89
+ #axs[1, 0].set_xticklabels(['Start', 'Mid', 'End'], rotation=45)
90
 
91
  axs[1, 1].plot(df.loc[df['Group'] == '6', 'Date'], df.loc[df['Group'] == '6', 'sales'], color='grey')
92
  axs[1, 1].plot(df.loc[df['Group'] == '6', 'Date'], df.loc[df['Group'] == '4', 'pred'], color = 'red')
93
  axs[1, 1].set_title('Article Group 4')
94
+ #axs[1, 1].set_xticklabels(['Start', 'Mid', 'End'], rotation=45)
95
 
96
+ plt.setp(axa.xaxis.get_majorticklabels(), rotation=45)
97
  plt.tight_layout()
98
  return fig, axs
99