Answers for "matplotlib hide axis"

2

not x axis labels python

plt.gca().axes.get_xaxis().set_visible(False)
plt.gca().axes.get_yaxis().set_visible(False)
Posted by: Guest on October-16-2020
0

how to hide axis in matplotlib

plt.axis("off")
Posted by: Guest on July-06-2021
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

Python Answers by Framework

Browse Popular Code Answers by Language