matplotlib学习笔记_pyplot API

pyplot API汇总

参考:http://c.biancheng.net/matplotlib/pyplot-api.html

pyplot

  1. jupyter notebook中图像行内显示:%matplotlib inline
  2. 第一个例子
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
%matplotlib inline
import math

x = np.arange(0,math.pi * 2,0.05)
y = np.sin(x)
plt.plot(x,y)
plt.xlabel('x')
plt.ylabel('sin(x)')
plt.title('wave')
plt.show()

posted on 2022-05-20 16:27  朝朝暮Mu  阅读(63)  评论(0)    收藏  举报