matplotlib.axes.Axes.axvline¶
- 
Axes.axvline(x=0, ymin=0, ymax=1, **kwargs)[源代码]¶
- 在轴上添加一条垂直线。 - 参数: - x浮点,默认值:0
- 垂直线数据坐标中的X位置。 
- ymin浮点,默认值:0
- 应该介于0和1之间,0是绘图的底部,1是绘图的顶部。 
- ymax浮点,默认值:1
- 应该介于0和1之间,0是绘图的底部,1是绘图的顶部。 
 - 返回: - 其他参数: - **kwargs
- 有效的关键字参数是 - Line2D属性,但“transform”除外:- 财产 - 描述 - agg_filter- 一种过滤函数,它接受一个(m,n,3)浮点数组和一个dpi值,并返回一个(m,n,3)数组。 - alpha- 浮动或无 - animated- 布尔 - antialiased或者aa- 布尔 - clip_box- Bbox- clip_on- 布尔 - clip_path- 面片或(路径、变换)或无 - color或c- 颜色 - contains- 未知的 - dash_capstyle- “对接”、“圆形”、“突出” - dash_joinstyle- 'miter'、'round'、'bevel' - dashes- 浮动顺序(点中的开/关墨迹)或(无,无) - data- (2,N)阵列或两个一维阵列 - drawstyle或ds- {'default','steps','steps pre','steps mid','steps post'},default:'默认' - figure- Figure- fillstyle- 'full'、'left'、'right'、'bottom'、'top'、'none' - gid- STR - in_layout- 布尔 - label- 对象 - linestyle或ls- '-'、'-'、'-'、'-'、':'、'、'、'(偏移量、开/关顺序)、… - linewidth或lw- 浮动 - marker- 标记样式字符串, - Path或- MarkerStyle- markeredgecolor或mec- 颜色 - markeredgewidth或者喵喵- 浮动 - markerfacecolor或mfc- 颜色 - markerfacecoloralt或mfcalt- 颜色 - markersize或ms- 浮动 - markevery- None或int or(int,int)或slice或List [int] 或float或(float,float)或List [bool] - path_effects- AbstractPathEffect- picker- 未知的 - pickradius- 浮动 - rasterized- 布尔或无 - sketch_params- (比例:浮动,长度:浮动,随机性:浮动) - snap- 布尔或无 - solid_capstyle- “对接”、“圆形”、“突出” - solid_joinstyle- 'miter'、'round'、'bevel' - transform- matplotlib.transforms.Transform- url- STR - visible- 布尔 - xdata- 一维阵列 - ydata- 一维阵列 - zorder- 浮动 
 - 实例 - 在…画一个粗红色的V线 x =0,跨越范围: - >>> axvline(linewidth=4, color='r') 
- 在以下位置绘制默认vline x =1,跨越范围: - >>> axvline(x=1) 
- 在以下位置绘制默认vline x =5,跨越了Y范围的中半部分: - >>> axvline(x=.5, ymin=0.25, ymax=0.75) 
 
 
 
 
 
 
 
 
 
