<human>:  Removing white space around a saved image in matplotlib
<bot>: Here is some code to remove white space padding around a saved image `test.png` in matplotlib

plt.savefig('test.png', bbox_inches='tight')

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.