import matplotlib.pyplot as plt from PIL import Image #Creation d'une image blanche RGB 10x10 dessin5 = Image.new("RGB",(600,400),(204,204,204)) #Definitions des couleurs blanc = (255, 255, 255) #On parcourt tous les pixels de l'image: for col in range(0, 600): for ligne in range(0, 400): if ligne >= (2/3)*col - 50 and ligne <= (2/3)*col + 50: dessin5.putpixel((col, ligne), blanc) plt.imshow(dessin5) plt.show()