标签:数据 lin title aced end code 绘制 size trace
#AutoTraceDraw.py
#读取端口参数绘制图形
import turtle as t
t.title(‘自动轨迹绘制‘)
t.setup(800, 600, 0, 0)
t.pencolor("red")
t.pensize(5)
#数据读取
datals = []
f = open("data.txt")
for line in f:
line = line.replace("\n","")
datals.append(list(map(eval, line.split(","))))
f.close()
#自动绘制
for i in range(len(datals)):
t.pencolor(datals[i][3],datals[i][4],datals[i][5])
t.fd(datals[i][0])
if datals[i][1]:
t.rt(datals[i][2])
else:
t.lt(datals[i][2])
标签:数据 lin title aced end code 绘制 size trace
原文地址:https://www.cnblogs.com/mouzaisi/p/12177829.html