import numpy
import matplotlib.pyplot as pyplot
def draw_fig():
count = 100
xArr = [i for i in range(count)]
yArr = numpy.random.random(count)
pyplot.axes(xlim=(0, count), ylim=(0, 1))
pyplot.plot(xArr, yArr, color="b")
pyplot.xlabel("x")
pyplot.ylabel("y")
pyplot.savefig("myfig.png")
pyplot.clf()
Python Matplotlib画图示例
最新推荐文章于 2022-10-13 09:28:49 发布