Python随机散点图

from random import choice
class RandomWalk():
    def __init__(self,num_points=5000):
        self.num_points = num_points
        self.x_values = [0]
        self.y_values = [0]
    def fill_walk(self):
        while len(self.x_values)
import  matplotlib.pyplot as plt
from walk import  RandomWalk
rw = RandomWalk()
rw.fill_walk()
print(rw.x_values)
print (rw.y_values)
plt.scatter(rw.x_values,rw.y_values,s=10)
plt.show()
Python随机散点图_第1张图片
QQ截图20170612235448.png

你可能感兴趣的:(Python随机散点图)