I would like to use plt.imshow
without a large white margin around the image. Here is an example:
import matplotlib.pyplot as plt
import numpy as np
data = np.random.rand(8, 8)
plt.imshow(data, origin='lower', interpolation='None', aspect='equal')
plt.axis('off')
plt.show()
and viewer window produced:
How to reduce the white space margin around the image?
This is not the same question as matplotlib.pyplot.imshow: removing white space within plots when using attributes "sharex" and "sharey". I tried suggestions from there to no effect.