Image 생성
선과 도형을 이미지로 생성합니다.소스가 저장되어 있는 폴드내에 사각형과 타원이 있는 ipg 저장되어 있습니다.from PIL import Image, ImageDraw, ImageFont im = Image.new("RGB", (512, 512), (128, 128, 128)) draw = ImageDraw.Draw(im) draw.line((0, im.height, im.width, 0), fill=(255, 0, 0), width=8) draw.rectangle((100, 100, 200, 200), fill=(0, 255, 0)) draw.ellipse((250, 300, 450, 400), fill=(0, 0, 255)) im.save('pillow_iamge_draw.jpg', quality..
접점
import matplotlib.pyplot as plt import numpy as np m1, b1 = 1, 0.0 # slope & intercept (line 1) m2, b2 = -1.0, 8.0 # slope & intercept (line 2) #----------------------------------------------------------------------------------------# # Step 1: plot the lines x = np.linspace(0,10,500) plt.plot(x,x*m1+b1) plt.plot(x,x*m2+b2) plt.xlim(0,8) plt.ylim(0,8) plt.title('How to plot an angle with matplot..