基本信息
源码名称:Python绘制折线图
源码大小:2.68KB
文件格式:.py
开发语言:Python
更新时间:2021-06-30
×
请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
源码介绍
import matplotlib.pyplot as plt import numpy as np x = np.linspace(0.5, 3.5, 100) # Returns num evenly spaced samples, calculated over the interval [start, stop]. y = np.sin(x) y1 = np.random.randn(100) # Return a sample (or samples) from the "standard normal" distribution. plt.plot(x, y, ls='-.', # 折线图的线条风格 lw=2, # 折线图的线宽 label='plot figure')