当前位置:网站首页>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 .
边栏推荐
- Dismantle a 100000 yuan BYD "Yuan". Come and see what components are in it.
- [set theory] set identities (idempotent law | exchange law | combination law | distribution rate | De Morgan law | absorption rate | zero law | identity | exclusion law | contradiction law | complemen
- Busycal latest Chinese version
- FuncS sh file not found when using the benchmarksql tool to test kingbases
- 服务器无法远程连接原因分析
- How to connect WiFi with raspberry pie
- Some information about the developer environment in Chengdu
- Ffmpeg mix
- [set theory] Cartesian product (concept of Cartesian product | examples of Cartesian product | properties of Cartesian product | non commutativity | non associativity | distribution law | ordered pair
- 2022-02-12 (338. Bit count)
猜你喜欢
Know that Chuangyu cloud monitoring - scanv Max update: Ecology OA unauthorized server request forgery and other two vulnerabilities can be detected
300+ documents! This article explains the latest progress of multimodal learning based on transformer
Dismantle a 100000 yuan BYD "Yuan". Come and see what components are in it.
C language series - Section 3 - functions
JS realizes lazy loading of pictures
X-ray normal based contour rendering
Prefix and (continuously updated)
JS实现图片懒加载
[literature reading] sparse in deep learning: practicing and growth for effective information and training in NN
FuncS sh file not found when using the benchmarksql tool to test kingbases
随机推荐
What functions need to be set after the mall system is built
[dynamic programming] subsequence problem
Taking two column waterfall flow as an example, how should we build an array of each column
Reptile exercise 03
Joint search set: the number of points in connected blocks (the number of points in a set)
Data Lake three swordsmen -- comparative analysis of delta, Hudi and iceberg
[fxcg] market analysis today
Solve BP Chinese garbled code
P35-P41 fourth_ context
Smart contract security audit company selection analysis and audit report resources download - domestic article
Analysis of the reason why the server cannot connect remotely
商城系统搭建完成后需要设置哪些功能
2022-02-13 (347. Top k high frequency elements)
Dismantle a 100000 yuan BYD "Yuan". Come and see what components are in it.
Which code editor is easy to use? Code editing software recommendation
PostgreSQL database high availability Patroni source code learning - etcd class
Kingbasees plug-in KDB of Jincang database_ exists_ expand
拆一辆十万元的比亚迪“元”,快来看看里面的有哪些元器件。
Sklearn data preprocessing
MySQL timestampdiff interval