当前位置:网站首页>matplotlib. Pyplot partition drawing
matplotlib. Pyplot partition drawing
2022-04-23 20:47:00 【NuerNuer】
There is not much emphasis on details here , Only the method of use is given here
Method 1 : Use plt.subplot function
plt.figure
plt.subplot(1,2,1) # Express 1 That's ok 2 The first area of the column
plt.plot(..)
plt.legend(..)
plt.xlabel(..)
plt.ylabel(..)
plt.subplot(1,2,2) # Express 1 That's ok 2 The second region of the column
plt.plot(..)
plt.legend(..)
plt.xlabel(..)
plt.ylabel(..)
plt.show()
Method 2 : Use plt.subplots() function
import matplotlib.pyplot as plt
fig, ax = plt.subplots(1,2)
ax[0].plot([3,2,1])
ax[0].legend('bb')
ax[0].set_xlabel('[0, 0]')
ax[1].plot([1,2,3]) #0,1 It means to select the first 0 Xing di 1 Column ax Subgraphs
ax[1].legend('aa')
ax[1].set_xlabel('[0, 1]')
plt.show()
About the setting of some details , You can refer to another blog post of mine :https://blog.csdn.net/qq_41368074/article/details/116669086
More complicated usage , Refer to this blog plt.subplot2grid The usage function :https://www.cnblogs.com/yoyo1216/p/10131662.html
In this paper, the reference :https://blog.csdn.net/wc881108/article/details/107656015
版权声明
本文为[NuerNuer]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204210545523139.html
边栏推荐
- Rt-1052 learning notes - GPIO architecture analysis
- Fastdfs思维导图
- 打新债中签以后怎么办,网上开户安全吗
- Come in and teach you how to solve the problem of port occupation
- go reflect
- Easy to use nprogress progress bar
- Explore ASP Net core read request The correct way of body
- [PTA] l2-011 play with binary tree
- Latex formula
- MySQL基础之写表(创建表)
猜你喜欢

BMP JPEG picture to vector image contourtrace

Devaxpress report replay: complete the drawing of conventional two-dimensional report + histogram + pie chart

Addition, deletion, modification and query of MySQL advanced table

又一款数据分析神器:Polars 真的很强大

MySQL进阶之表的增删改查

Go zero framework database avoidance Guide

Another data analysis artifact: Polaris is really powerful

On the three paradigms of database design

LeetCode 542、01 矩阵

Vulnhub DC: 1 penetration notes
随机推荐
Awk print special characters
JS arrow function user and processing method of converting arrow function into ordinary function
laravel 发送邮件
IOT 设计与开发
启牛学堂有用吗,推荐的证券账户是否安全
Explore ASP Net core read request The correct way of body
中创存储|想要一个好用的分布式存储云盘,到底该怎么选
Sequential state
Selenium displays webdriverwait
Queue template code
软件测试要怎么学?自学还是培训看完这篇文章你就懂了
Recommended usage scenarios and production tools for common 60 types of charts
Go limit depth traversal of files in directory
Go language development Daily Fresh Project Day 3 Case - Press Release System II
【SQL】字符串系列2:将一个字符串根据特定字符分拆成多行
go array
[PTA] l2-011 play with binary tree
Linux中,MySQL的常用命令
Matlab matrix index problem
MySQL advanced common functions