plot image without axes python

plt.axis('off')

Here is what the above code is Doing:
1. We’re creating a figure with a size of 8×8 inches.
2. We’re adding an Axes to the figure.
3. We’re plotting a random image from the CIFAR-10 dataset.
4. We’re hiding the x and y axes.