科学图像

每个图像的标题指示函数的名称。

  • hubble_deep_field
  • immunohistochemistry
  • lily
  • microaneurysms
  • moon
  • retina
  • shepp_logan_phantom
  • skin
  • cell
  • human_mitosis

输出:

Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).

import matplotlib.pyplot as plt
import matplotlib

from skimage import data

matplotlib.rcParams['font.size'] = 18

images = ('hubble_deep_field',
          'immunohistochemistry',
          'lily',
          'microaneurysms',
          'moon',
          'retina',
          'shepp_logan_phantom',
          'skin',
          'cell',
          'human_mitosis',
          )


for name in images:
    caller = getattr(data, name)
    image = caller()
    plt.figure()
    plt.title(name)
    if image.ndim == 2:
        plt.imshow(image, cmap=plt.cm.gray)
    else:
        plt.imshow(image)

plt.show()

脚本的总运行时间: (0分7.178秒)

Gallery generated by Sphinx-Gallery