Answers for "import matplotlib as plt plot image"

C
1

show image in matplotlib

%pylab inline
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
img = mpimg.imread('your_image.png')
imgplot = plt.imshow(img)
plt.show()
Posted by: Guest on March-10-2021
0

matplotlib export image

from matplotlib import pyplot as plt

plt.savefig('foo.png')
plt.savefig('foo.pdf')
Posted by: Guest on April-23-2021

Code answers related to "import matplotlib as plt plot image"

Code answers related to "C"

Browse Popular Code Answers by Language