

"""Simple demo of the imshow function."""importmatplotlib.pyplotaspltimportmatplotlib.cbookascbookimage_file=cbook.get_sample_data('ada.png')image=plt.imread(image_file)fig,ax=plt.subplots()ax.imshow(image)ax.axis('off')# clear x- and y-axesplt.show()
Keywords: python, matplotlib, pylab, example, codex (seeSearch examples)