文件名称:python绘制动态曲线教程
文件大小:91KB
文件格式:PDF
更新时间:2024-01-10 04:47:26
python 动态 教程
从txt种获取数据 并且通过动态曲线显示 import numpy as np import matplotlib.pyplot as plt import matplotlib.animation as animation import time # Fixing random state for reproducibility np.random.seed(196) path = "feed.txt" file = open(path, 'r') data = [] for line in file.readlines(): lineArr = line.strip().split()