#!/usr/bin/python3 # -*- coding: utf-8 -*- # %% matplotlib # https://matplotlib.org/tutorials/index.html import matplotlib.pyplot as plt help(plt) # You can do basic mathy plotting: help(plt.plot) plt.plot([1, 2, 3, 4]) plt.ylabel("some numbers") help(plt.show) plt.show() # Matrices are how images are represented! plt.imshow([[250, 250, 250], [1, 1, 1], [250, 250, 250]], cmap="Greys") plt.show() python_image = plt.imread("python.png") print(python_image) print(type(python_image)) print(python_image.shape) # All matrices plt.imshow(python_image) plt.show() for color_matrix in range(4): plt.imshow(python_image[:, :, color_matrix]) plt.show()