Python 入门练习--matplotlib.pyplot画图

5 (x,y) data point: [1,2], [3,4], [5,6],[7,8]. Use Matplotlib to plot out these data points.

1 import matplotlib.pyplot as plt
2 figure1 = plt.plot( [1,3,5,7], [2,4,6,8], 'ro')
3 plt.xlabel('x')
4 plt.ylabel('y')

Get help of plt.plot

1 help(plt.plot)

 

posted @ 2020-09-26 09:19  cfdchen  阅读(175)  评论(0编辑  收藏  举报