# 13 - image
"""
Please note, this script is for python3+.
If you are using python2+, please modify it accordingly.
"""

import matplotlib.pyplot as plt
import numpy as np

# image data
a = np.array([0.313660827978, 0.365348418405, 0.423733120134,
              0.365348418405, 0.439599930621, 0.525083754405,
              0.423733120134, 0.525083754405, 0.651536351379]).reshape(3,3)

"""
for the value of "interpolation", check this:
http://matplotlib.org/examples/images_contours_and_fields/interpolation_methods.html
for the value of "origin"= ['upper', 'lower'], check this:
http://matplotlib.org/examples/pylab_examples/image_origin.html
for the value of cmap="bone", check this:
https://blog.csdn.net/qq_28485501/article/details/82656614
"""
plt.imshow(a, interpolation='nearest', cmap='bone', origin='lower')
# plt.imshow(a, interpolation='nearest', origin='lower')
plt.colorbar(shrink=.92)

# plt.xticks(())
# plt.yticks(())
plt.show()


# 13 - image
"""
Please note, this script is for python3+.
If you are using python2+, please modify it accordingly.
"""

import matplotlib.pyplot as plt
import numpy as np

# image data
a = np.array([0.313660827978, 0.365348418405, 0.423733120134,
              0.365348418405, 0.439599930621, 0.525083754405,
              0.423733120134, 0.525083754405, 0.651536351379]).reshape(3,3)

"""
for the value of "interpolation", check this:
http://matplotlib.org/examples/images_contours_and_fields/interpolation_methods.html
for the value of "origin"= ['upper', 'lower'], check this:
http://matplotlib.org/examples/pylab_examples/image_origin.html
for the value of cmap="bone", check this:
https://blog.csdn.net/qq_28485501/article/details/82656614
"""
plt.imshow(a, interpolation='nearest', cmap='bone', origin='lower')
# plt.imshow(a, interpolation='nearest', origin='lower')
plt.colorbar(shrink=.92)

# plt.xticks(())
# plt.yticks(())
plt.show()


# 13 - image Please note, this script is for python3+. If you are using python2+, please modify it accordingly. # image data for the value of "interpolation", check this: http://matplotlib.org/examples/images_contours_and_fields/interpolation_methods.html for the value of "origin"= ['upper', 'lower'], check this: http://matplotlib.org/examples/pylab_examples/image_origin.html for the value of cmap="bone", check this: https://blog.csdn.net/qq_28485501/article/details/82656614 # plt.imshow(a, interpolation='nearest', origin='lower') # plt.xticks(()) # plt.yticks(())