The following code (obtained from
What I'm trying to do is reduce the empty space on the y-axis, indicated here by the red bars:
How can I do this? Changing the height of the figure doesn't seem to help.
CodePudding user response:
One quick solution is to manually set the margins using
plt.margins(y=0) # no margin at all
plt.margins(y=1/len(df)) # equal margin