I am using the following code to plot a bar graph using bar graph. It is a pandas dataframe of stock prices and indicator values. I am seeing a gap in my plot which are market close hours but my dataframe does not have rows for those market close hours. After the last data point of the day next data point starts at next day's open.
Here's the code:
df_final = df_supp.iloc[-100:]
df_final.dropna(inplace=True)
df_final['DateTime'] = df_final.index
x_axis =df_final['DateTime']
plt.figure(figsize=(18,6))
plt.bar(x_axis, df_final['wvf_support'], color=['lime' if x=='lime' else 'gray' for x in df_final['wvf_support_signal']], align='center', width=.005)
plt.show()
And here is the output I see:
Please help me remove this unnecessary gap. Thanks!