You may try
plt.savefig('X:/' + newName + '.png', bbox_inches='tight')
Or you may define figure size like
fig = plt.figure(figsize=(9, 11))
...
plt.savefig(filename, bbox_inches = 'tight')
As described in the documentation you may also try:
plt.tight_layout()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With