Call in code plt.show No img image is displayed after ()
import matplotlib.pyplot as plt
plt.imshow(img)
The solution is as follows:
First, add the following in the header file:
import pylab
Then in the original code plt.show (IMG) add the following:
pylab.show()
As shown in the figure, the picture can be displayed normally
Read More:
- plt.show () and plt.imshow The difference between ()
- plt.plot and plt.imshow difference
- Import Matplotlib.pyplot as plt Error KeyError: ‘pylab’
- Matplotlib of data visualization plt.xlim The () ylim() function sets the x-axis and y-axis range coordinates
- Ueditor paste word image and upload image file automatically
- Ant Design upload listtype = “picture card” realizes multi image upload and click preview image encapsulation
- Matlab im show squeeze
- VTK cultivation 26: basic operation of image_ Three dimensional image slice extraction
- [docker] error in deleting image: image is referenced in multiple repositories
- ImageIO.read () unsupported image type when reading picture_ exception Unsupported Image Type
- Error: unable to resolve dependency for… Could not resolve project
- “Typeerror: invalid dimensions for image data” in Matplotlib drawing imshow() function
- AttributeError: type object ‘Image‘ has no attribute ‘open‘
- Android EditText cursor control, color modification, show and hide
- When pychar’s project interpreter installs the package, nothing to show
- Mac: how to show hidden files under Apple Mac operating system
- Error: typecheck; offendingcommand: Show
- Idea has installed markdown, open it or will not show preview effect
- Nanny level solutions use the enterprise version of MyEclipse to show the MyEclipse trial expired solution and activation
- Image proxy settings Flash + JavaScript