当前位置:网站首页>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()

边栏推荐
- UEFI: repair efi/gpt bootloader
- How to increase the monthly salary of software testing from 10K to 30K? Only automated testing can do it
- What is the file that tp6 automatically executes? What does the tp6 core class library do?
- Oracle one line function Encyclopedia
- RMB 3000 | record "tbtools" video, make a friend and get a cash prize!
- Oracle-单行函数大全
- On which platform is it safe to buy shares and open an account? Ask for sharing
- 一、单个神经元网络构建
- matplotlib matplotlib中决策边界绘制函数plot_decision_boundary和plt.contourf函数详解
- C#程序终止问题CLR20R3解决方法
猜你喜欢

How to increase the monthly salary of software testing from 10K to 30K? Only automated testing can do it

C language: count the number of words in a paragraph

RMB 3000 | record "tbtools" video, make a friend and get a cash prize!

LVS-DR模式单网段案例

某次比赛wp

【OpenCV】—输入输出XML和YAML文件

matplotlib matplotlib中axvline()和axhline()函数

wav文件(波形文件)格式分析与详解

二、训练fashion_mnist数据集

C language: bubble sort
随机推荐
三、自动终止训练
C language "Recursion Series": recursively realizing the n-th power of X
《乔布斯传》英文原著重点词汇笔记(三)【 chapter one】
Check whether the point is within the polygon
高速缓冲存储器Cache的映射方式
《乔布斯传》英文原著重点词汇笔记(六)【 chapter three 】
1、 Construction of single neural network
nodejs 使用Express框架demo
socket编程——poll模型
How annotation lib and processor lib reference
获取扫码的客户端是微信还是支付宝
Summary of hardfault problem in RTOS multithreading
(翻译)采用字母间距提高全大写文本可读性的方式
Emergency administrative suspension order issued Juul can continue to sell electronic cigarette products in the United States for the time being
C#启动程序传递参数丢失双引号,如何解决?
Notes on key words in the original English work biography of jobs (IV) [chapter two]
C language: bubble sort
Openfoam: bottom layer
备战2022年金九银十必问的1000道Android面试题及答案整理,彻底解决面试的烦恼
2、 Training fashion_ MNIST dataset