程序员最近都爱上了这个网站  程序员们快来瞅瞅吧!  it98k网:it98k.com

本站消息

站长简介/公众号

  出租广告位,需要合作请联系站长

+关注
已关注

分类  

暂无分类

标签  

暂无标签

日期归档  

2024-11(3)

matplotlib.pyplot.xlim()、ylim()、axis()结构及用法||参数详解

发布于2019-08-17 22:00     阅读(5644)     评论(0)     点赞(0)     收藏(4)


matplotlib.pyplot.xlim(*args, **kwargs)
  • 1

获取或者是设定x座标轴的范围,当前axes上的座标轴。

有两种参数输入方式

  1. plt.xlim(num1, num2)
    
    • 1

在这里插入图片描述

  1. plt.xlim(xmin=num1,xmax=num2)
    
    • 1

在这里插入图片描述

内容与x一样

matplotlib.pyplot.axis(*v, **kwargs)
  • 1

参数详解:

  1. xmin, xmax, ymin, ymax : float, optional

  2. 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.
  3. emit : bool, optional, default True

在这里插入图片描述



所属网站分类: 技术文章 > 博客

作者:74873487

链接:https://www.pythonheidong.com/blog/article/48544/9f0b946877de85b89395/

来源:python黑洞网

任何形式的转载都请注明出处,如有侵权 一经发现 必将追究其法律责任

0 0
收藏该文
已收藏

评论内容:(最多支持255个字符)