当前位置:网站首页>Two drawing interfaces - 1 Matlab style interface
Two drawing interfaces - 1 Matlab style interface
2022-07-03 04:25:00 【You can sleep at this stage】
MATLAB Style interface by plt Module supply ,plt Contains a series of drawing commands ( function ), Name and MATLAB Almost the same .
# The import module / package
import matplotlib.pyplot as plt
import numpy as np
# Generate the data
x = np.linspace(0,10,200)
# Create a shape
plt.figure()
# Create two subgraph templates
# Create the first sub graph
plt.subplot(2,1,1)
plt.plot(x,np.cos(x))# Drawing graphics
# Create the 2 Subtext
plt.subplot(2,1,2)
plt.plot(x,np.sin(x))# Drawing graphics
plt.show()

It's used here 3 An order , Each one is very concise .
- figure() function : Create a blank graphic .
- subplot ( rows , columns , subplot number ) function : Create subgraphs , The first 1 Set the number of lines in the subgraph with three parameters , The first 2 Parameters set the number of subgraphs , The first 3 Parameter setting sub figure serial number .
- plot (x , y ) function : Drawing graphics , The first 1 The parameter is x Axis provides data , The first 2 The parameter is y Axis provides data .
边栏推荐
- JS实现图片懒加载
- 540. Single element in ordered array
- 使用BENCHMARKSQL工具对KingbaseES执行测试时报错funcs sh file not found
- 金仓数据库KingbaseES 插件kdb_date_function
- Causal AI, a new paradigm for industrial upgrading of the next generation of credible AI?
- 220214c language learning diary
- Taking two column waterfall flow as an example, how should we build an array of each column
- Prefix and (continuously updated)
- What's wrong with SD card data damage? How to recover SD card data damage
- Data Lake three swordsmen -- comparative analysis of delta, Hudi and iceberg
猜你喜欢

Know that Chuangyu cloud monitoring - scanv Max update: Ecology OA unauthorized server request forgery and other two vulnerabilities can be detected

Daily question - ugly number

会员积分商城系统的功能介绍

使用BENCHMARKSQL工具对KingbaseES预热数据时执行:select sys_prewarm(‘NDX_OORDER_2 ‘)报错

When using the benchmarksql tool to preheat data for kingbasees, execute: select sys_ Prewarm ('ndx_oorder_2 ') error

Function introduction of member points mall system

JS realizes lazy loading of pictures

Some information about the developer environment in Chengdu

Golang -- realize file transfer

CVPR 2022 | Dalian Technology propose un cadre d'éclairage auto - étalonné pour l'amélioration de l'image de faible luminosité de la scène réelle
随机推荐
Export of zip file
Web - Information Collection
智能合约安全审计公司选型分析和审计报告资源下载---国内篇
[set theory] set concept and relationship (true subset | empty set | complete set | power set | number of set elements | power set steps)
Data Lake three swordsmen -- comparative analysis of delta, Hudi and iceberg
[free completion] development of course guidance platform (source code +lunwen)
When using the benchmarksql tool to preheat data for kingbasees, execute: select sys_ Prewarm ('ndx_oorder_2 ') error
Kubernetes source code analysis (I)
Fcpx template: sweet memory electronic photo album photo display animation beautiful memory
Writing skills of multi plate rotation strategy -- strategy writing learning materials
What are the Bluetooth headsets with good sound quality in 2022? Inventory of four high-quality Bluetooth headsets
会员积分商城系统的功能介绍
JS realizes lazy loading of pictures
C language series - Section 3 - functions
What's wrong with SD card data damage? How to recover SD card data damage
2022-02-12 (338. Bit count)
Deep dive kotlin synergy (19): flow overview
After reviewing MySQL for a month, I was stunned when the interviewer of Alibaba asked me
[nlp] - brief introduction to the latest work of spark neural network
Wine travel Jianghu War: Ctrip is strong, meituan is strong, and Tiktok is fighting