2021
03-02
03-02
matplotlib阶梯图的实现(step())
step函数概述step函数用于绘制阶梯图。根据源码可知,step函数是对plot函数的轻量级封装,很多概念和用法与plot函数非常相似。defstep(self,x,y,*args,where='pre',data=None,**kwargs):cbook._check_in_list(('pre','post','mid'),where=where)kwargs['drawstyle']='steps-'+wherereturnself.plot(x,y,*args,data=data,**kwargs)step函数签名:matplotlib.pyplot.step(x,y,*args,where='pre',data=None...
继续阅读 >