I am plotting an image in matplotlib, and it keeps giving me some padding. This is what I have tried:
def field_plot(): x = [i[0] for i in path] y = [i[1
Try using pad_inches=0, i.e.
pad_inches=0
plt.savefig( IMG_DIR + 'match.png',bbox_inches='tight', transparent="True", pad_inches=0)
From the documentation:
pad_inches: Amount of padding around the figure when bbox_inches is ‘tight’.
I think the default is pad_inches=0.1
pad_inches=0.1