本文主要是介绍matplotlib.pyplot.xlim()、ylim()、axis()结构及用法||参数详解,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
-
matplotlib.pyplot.xlim() 官方文档
matplotlib.pyplot.xlim(*args, **kwargs)
获取或者是设定x座标轴的范围,当前axes上的座标轴。
有两种参数输入方式
-
plt.xlim(num1, num2)
-
plt.xlim(xmin=num1,xmax=num2)
-
matplotlib.pyplot.ylim 官方文档
内容与x一样
-
matplotlib.pyplot.axis 官方文档
matplotlib.pyplot.axis(*v, **kwargs)
参数详解:
-
xmin, xmax, ymin, ymax : float, optional
-
option : str
Value Description ‘on’ Turn on axis lines and labels. ‘off’ Turn off axis lines and labels. ‘equal’ Set equal scaling (i.e., make circles circular) by changing axis limits. ‘scaled’ Set equal scaling (i.e., make circles circular) by changing dimensions of the plot box. ‘tight’ Set limits just large enough to show all data. ‘auto’ Automatic scaling (fill plot box with data). ‘normal’ Same as ‘auto’; deprecated. ‘image’ ‘scaled’ with axis limits equal to data limits. ‘square’ Square plot; similar to ‘scaled’, but initially forcing xmax-xmin = ymax-ymin
. -
emit : bool, optional, default True
这篇关于matplotlib.pyplot.xlim()、ylim()、axis()结构及用法||参数详解的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!