python 用turtle 绘制案
1.环境系统:windows10python版本:python3.6.1使用的库:matplotlib,numpy2.numpy库产生随机数几种方法import numpy as npnumpy.randomrand(d0, d1, ..., dn) In [2]: x=np.random.rand(2,5)In [3]: xOut[3]:array([[ 0.84286554, 0.50007593, 0.66500549, 0.97387807, 0.03993009],[ 0.46391661, 0.50717355, 0.21527461, 0.92692517, 0.2567891 ]])randn(d0, d1, ..., dn)查询结果为标准正态分布In [4]: x=np.random.randn(2,5)In [5]: xOut[5]:array([[-0.77195196, 0.26651203, -0.35045793, -0.0210377 , 0.89749635],[-0.20229338, 1.44852833, -0.10858996, -1.65034606, -0.39793635]])randint(low,high,size) 生成low到high之间(半开区间 [low, high)),size个数据In [6]: x=np.random.randint(1,8,4)In [7]: xOut[7]: array([4, 4, 2, 7])random_integers(low,high,size) 生成low到high之间(闭区间 [low, high)),size个数据In [10]: x=np.random.random_integers(2,10,5)In [11]: xOut[11]: array([7, 4, 5, 4, 2])3.散点图x x轴y y轴s 圆点面积c 颜色marker 圆点形状alpha 圆点透明度 #其他图也类似这种配置N=50# height=np.random.randint(150,180,20)# weight=np.random.randint