尝试运行matplotlib显示图片

来源:互联网 发布:python 中英文摘要 编辑:程序博客网 时间:2024/05/16 02:25
测试这里的案例
http://matplotlib.org/1.3.1/examples/images_contours_and_fields/image_demo.html
"""Simple demo of the imshow function."""import matplotlib.pyplot as pltimport matplotlib.cbook as cbookimage_file = cbook.get_sample_data('ada.png')image = plt.imread(image_file)plt.imshow(image)plt.axis('off') # clear x- and y-axesplt.show()

图片看上去不错

http://code.google.com/p/pythonxy/wiki/Downloads


0 0
原创粉丝点击