I am using subplot in matplotlib to make bar graph currently showing data labels on top of the bars (in rotated position). Please see the image.
as per this the datalabels are touching the bars. Can they be offset to give some space between the bar and the datalabel. Following is my code. Please help.
x = df_graph3['Parameter2'].values
y1 = df_graph3['Vol Flow'].values
z1 = Figure(figsize=(2, 3), tight_layout=TRUE)
plot1 = z1.add_subplot(1, 1, 1)
plot1.bar(x, y1, color='#EB3F3F')
plot1.spines['top'].set_visible(False)
plot1.spines['right'].set_visible(False)
plot1.spines['left'].set_visible(False)
plot1.spines['bottom'].set_visible(False)
for i in range(len(x)):
plot1.text(i, y1[i], y1[i], ha='center', va='bottom', size=8,rotation=90)
plot1.axes.get_yaxis().set_visible(False)
plot1.set_xticklabels(x, fontsize=8)
canvas1 = FigureCanvasTkAgg(z1, master=frame_dash3)
canvas1.draw()
canvas1.get_tk_widget().grid(row=5, column=0, columnspan=2, pady=10, sticky='nsew')