当前位置:网站首页>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 .
边栏推荐
- sklearn数据预处理
- [fxcg] inflation differences will still lead to the differentiation of monetary policies in various countries
- 2022-02-12 (338. Bit count)
- AWS VPC
- Kubernetes源码分析(一)
- Xrandr modifier la résolution et le taux de rafraîchissement
- Which code editor is easy to use? Code editing software recommendation
- Js/ts bottom implementation double click event
- C language series - Section 3 - functions
- [untitled] 2022 safety production supervisor examination question bank and simulated safety production supervisor examination questions
猜你喜欢

JS实现图片懒加载

Web - Information Collection

使用BENCHMARKSQL工具对kingbasees并发测试时kill掉主进程成功后存在子线程未及时关闭

Introduction of pointer variables in function parameters

300+ documents! This article explains the latest progress of multimodal learning based on transformer
![[dynamic programming] subsequence problem](/img/d8/020ae959ef53ce097d3a81a0d2d63a.jpg)
[dynamic programming] subsequence problem

vulnhub HA: Natraj

金仓KFS数据双向同步场景部署

Busycal latest Chinese version

Design and implementation of JSP logistics center storage information management system
随机推荐
Database management tool, querious direct download
[Chongqing Guangdong education] reference materials for design and a better life of Zhongyuan Institute of science and technology
GFS distributed file system (it's nice to meet it alone)
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
Arthas watch grabs a field / attribute of the input parameter
SSM based campus part-time platform for College Students
vulnhub HA: Natraj
竞品分析撰写
Function introduction of member points mall system
Deep dive kotlin synergy (20): build flow
Pdf editing tool movavi pdfchef 2022 direct download
[fxcg] market analysis today
x Problem B
[free completion] development of course guidance platform (source code +lunwen)
PostgreSQL database high availability Patroni source code learning - etcd class
Solve BP Chinese garbled code
[no title] 2022 chlorination process examination content and free chlorination process examination questions
CVPR 2022 | Dalian Institute of technology proposes a self calibration lighting framework for low light level image enhancement of real scenes
RSRS指标择时及大小盘轮动
What's wrong with SD card data damage? How to recover SD card data damage