#coding:gbk
import matplotlib.pyplot as plt
from radom_walk import randomwalk
#创建一个random实例,并将其包含的点都绘制出来
while True:
'''只要程序处于活动状态,就不断地模拟随机漫步'''
rw =randomwalk()
rw.fill_walk()
pointnums = list(range(rw.numpoints)
plt.scatter(rw.xvalues,rw.yvalues,c=pointnums,cmap=plt.cm.Blues,edgecolor,s=15)
plt.show()
keepruning = input('你想再次生成一个随机漫步图吗?(y/n) :')
if keepruning == 'n':
break
plt.scatter(rw.xvalues,rw.yvalues,c=pointnums,cmap=plt.cm.Blues,edgecolor,s=15)
SyntaxError: invalid syntax
网友评论