center right' : 7,
'lower center' : 8,
'upper center' : 9,
'center' : 10,
2.6 Annotation 标注
当图线中某些特殊地方需要标注时...(2)gridspec
导入matplotlib.gridspec,使用gridspec.Gridspec将图像窗口分成3行3列
gs[0,:]表示第0行的所有列
import matplotlib.pyplot...as plt
import matplotlib.gridspec as gridspec
plt.figure()
gs = gridspec.GridSpec(3, 3)
ax1 = plt.subplot...在这里,假设figure的大小是10x10,那么大图就被包含在由(1, 1)开始,宽8,高8的坐标系内。...当直接使用plt时设置属性时不用加上set_
import matplotlib.pyplot as plt
fig = plt.figure()
x = [1, 2, 3, 4, 5, 6, 7]