当前位置:网站首页>Matplotlib axvline() and axhline() functions in Matplotlib
Matplotlib axvline() and axhline() functions in Matplotlib
2022-06-25 08:58:00 【Guoqingru】
matplotlib matplotlib in axvline() and axhline() function
# -*- encoding: utf-8 -*-
# @File : axhline.py
# @Author: Mr. Luo
# @Date: 2021/11/6 13:40
'''
feature: Draw parallel to x Horizontal reference line of axis
'''
import matplotlib.pyplot as plt
import numpy as np
'''
y: The starting point of the horizontal reference line
c: Reference line color
ls: Reference line style
lw: Reference line width
Translational : The function function above , Call signature and parameter description can also be translated to function axvline() On
'''
x = np.linspace(0.2, 10, 1000)
y = np.sin(x)
plt.plot(x, y, ls="-.", c='b', label="figure")
plt.legend()
plt.axhline(y=0.0, c="g", ls="--", lw=2)
plt.axvline(x=4.0, c="r", ls="--", lw=2)
plt.show()

边栏推荐
- [summary] 1361- package JSON and package lock JSON relationship
- 五、项目实战---识别人和马
- 【OpenCV】—离散傅里叶变换
- 第十五周作业
- Chinese solution cannot be entered after webgl is published
- [MySQL] understanding of transactions
- What does openid mean? What does "token" mean?
- 《乔布斯传》英文原著重点词汇笔记(六)【 chapter three 】
- 自定义注解之编译时注解(RetentionPolicy.CLASS)
- annotation lib 和 processor lib如何引用
猜你喜欢

How can games copied from other people's libraries be displayed in their own libraries

compiling stm32f4xx_ it. c... “.\Objects\BH-F407.axf“ - 42 Error(s), 1 Warning(s).

The city chain technology platform is realizing the real value Internet reconstruction!

C language "recursive series": recursive implementation of 1+2+3++ n

Nodejs using the express framework demo

C program termination problem clr20r3 solution
![[515. find the maximum value in each tree row]](/img/0d/7ae494a5b3df3917ab95ebf61a1c96.png)
[515. find the maximum value in each tree row]

四、卷积神经网络(Convolution Neural Networks)

compiling stm32f4xx_it.c... “.\Objects\BH-F407.axf“ - 42 Error(s), 1 Warning(s).
![[operation tutorial] how does the tsingsee Qingxi video platform import the old database into the new database?](/img/21/08194ac26dec50c222b88f1f64f894.png)
[operation tutorial] how does the tsingsee Qingxi video platform import the old database into the new database?
随机推荐
C language "recursive series": recursive implementation of 1+2+3++ n
Level 6 easy to mix words
flutter 多语言的intl: ^0.17.0导不进去
Explanation of assertions in JMeter
sklearn PolynomialFeatures的具体用法
一、单个神经元网络构建
How to increase the monthly salary of software testing from 10K to 30K? Only automated testing can do it
Trendmicro:apex one server tools folder
【MYSQL】索引的理解和使用
[reinforcement learning notes] common symbols in reinforcement learning
Hyper-v:hyper-v generation 1 or generation 2 virtual machines
Check whether the point is within the polygon
socket编程——poll模型
Unknown table 'column of MySQL_ STATISTICS‘ in information_ schema (1109)
【OpenCV】—离散傅里叶变换
Openfoam: bottom layer
ICer必须知道的35个网站
《乔布斯传》英文原著重点词汇笔记(四)【 chapter two 】
C language: count the number of characters, numbers and spaces
CSV parameterization in JMeter