Matplotlib庫進行繪圖:折線圖、函數圖、散點圖、餅圖、柱狀圖等

一、畫出正弦曲線與餘弦曲線,並進行相關繪圖設置。python 效果以下圖所示:編程 import matplotlib.pyplot as plt import numpy as np x = np.linspace(0,6,50) y1 = [np.sin(i) for i in x] y2 = [np.cos(i) for i in x] plt.figure(num='Sin and Cos
相關文章
相關標籤/搜索