import numpy as np
import sys
import matplotlib as mpl
import matplotlib.pyplot as plt
i use the following code to save an image
fig, ax = plt.subplots(frameon=False)
ax.axis ('off')
ax.imshow (array[:,:,0,0,0])
fig.savefig ("file.png", bbox_inches='tight')
However, what I get is
and this obviously still has a white border.
How do I get rid of it?
The array.shape is: (256, 256, 1, 1, 3)