Answers for "how to remove x axis and y axis of an image in imshow in python"

0

plt off axis

from numpy import random
import matplotlib.pyplot as plt

data = random.random((5,5))
img = plt.imshow(data, interpolation='nearest')
img.set_cmap('hot')
plt.axis('off')
plt.savefig("test.png", bbox_inches='tight')
Posted by: Guest on September-07-2020

Code answers related to "how to remove x axis and y axis of an image in imshow in python"

Python Answers by Framework

Browse Popular Code Answers by Language