%matplotlib作用
- 是在使用jupyter notebook 或者 jupyter qtconsole的时候,才会经常用到%matplotlib。
- 而%matplotlib具体作用是当你调用matplotlib.pyplot的绘图函数plot()进行绘图的时候,或者生成一个figure画布的时候,可以直接在你的python console里面生成图像。
numpy.
linspace
(start, stop, num=50, endpoint=True, retstep=False, dtype=None, axis=0)在一个区间内分割
https://www.numpy.org/devdocs/reference/generated/numpy.linspace.html#numpy.linspace
方法二传的变量必须事一一对应
圆 椭圆 双曲线等图像需要分段来画,每段图像的函数表达式不一样。
matplotlib.pyplot.
grid
(b=None, which='major', axis='both', **kwargs)
https://matplotlib.org/api/_as_gen/matplotlib.pyplot.grid.html#matplotlib.pyplot.grid
将一个画面切割成若干 add_subplot(a,b,c) c不能大于a和b的乘积
matplotlib.pyplot.
axis
(*args, **kwargs)
https://matplotlib.org/api/_as_gen/matplotlib.pyplot.axis.html#matplotlib.pyplot.axis
matplotlib.pyplot.
ylabel
(ylabel, fontdict=None, labelpad=None, **kwargs)
https://matplotlib.org/api/_as_gen/matplotlib.pyplot.ylabel.html#matplotlib.pyplot.ylabel