2

I have the following code :

ax = df30_pivoted.plot(kind='bar', figsize=(30,20), linewidth=5)
plt.xticks(rotation='vertical')
plt.tick_params(labelsize=20)
plt.xlabel('session_date', fontsize=20)
plt.grid(True)
plt.title('', fontdict={'fontsize':60})
legend = ax.legend(loc=0, ncol=1, bbox_to_anchor=(0,1,1), fancybox=True, shadow=False, title='variations', prop={'size':45})


xposition = c12
for xc in xposition:
    ax.axvline(x=xc, color='r', linewidth=4)
plt.setp(legend.get_title(), fontsize='30')

plt.show()

i expect above code put vertical line where index on x axis is equivalent to what i have in c12 , c12 is a pandas Series with type datetime64[ns] but resulted bar plot has no vertical line :

enter image description here

Tolgahan ÜZÜN
  • 423
  • 7
  • 14
chessosapiens
  • 3,159
  • 10
  • 36
  • 58

0 Answers0