绘制八个子图
1
2
3
4
5
6
7
8
9
10
11
12
|
import matplotlib.pyplot as plt
fig = plt.figure()
shape = [ '.' , 'o' , 'v' , '>' , '<' , '8' , 's' , '*' ]
for j in range ( 8 ):
x = [i for i in range ( 6 )]
y = [i * * 2 for i in range ( 6 )]
ax = fig.add_subplot( 241 + j)
ax.scatter(x,y,c = 'r' ,marker = shape[j])
ax.set_title( '第' + str (j))
plt.show()
|
以上这篇python绘制多个子图的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持服务器之家。
原文链接:https://blog.csdn.net/weixin_40198632/article/details/81482635