当前位置:网站首页>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
边栏推荐
猜你喜欢
go slice
Express③(使用Express编写接口、跨域有关问题)
Leetcode 542, 01 matrix
wait、waitpid
Zhongchuang storage | how to choose a useful distributed storage cloud disk
Addition, deletion, modification and query of MySQL advanced table
Install MySQL 5.0 under Linux 64bit 6 - the root password cannot be modified
居家第二十三天的午饭
笔记本电脑卡顿怎么办?教你一键重装系统让电脑“复活”
Some grounded words
随机推荐
Sequential state
2021-06-29 C escape character cancellation and use
pikachuxss如何获取cookie靶场,返回首页总是失败
go array
UKFslam
bounding box iou
Express③(使用Express编写接口、跨域有关问题)
An error occurs when the addressable assets system project is packaged. Runtimedata is null
[PTA] l1-006 continuity factor
Vulnhub DC: 1 penetration notes
Unity asset import settings
Vscode download speed up
Thinking after learning to type
打新债中签以后怎么办,网上开户安全吗
wait、waitpid
Linux中,MySQL的常用命令
Resolve the eslint warning -- ignore the warning that there is no space between the method name and ()
Leetcode 74. Search two-dimensional matrix
Leetcode 1337. Row K with the weakest combat effectiveness in the matrix
Async function ------ ES6