0
我嘗試了按照其他帖子中的建議,但不起作用(例如下圖)。從子圖中移除標籤和抽搐
我需要在同一圖像中繪製一組幀,並且我想要爲每個子圖除去兩個抽搐和標籤。你在我的代碼中發現任何錯誤(下文)?讓mw知道你是否會用另一種方法!
import matplotlib.pyplot as plt
# Figure which will include the other frames
fig, axes = plt.subplots(A.shape[0], A.shape[0], figsize=(15,15))
# Iteratively add the frames
for i in range(A.shape[0]*A.shape[0]):
a1 = fig.add_subplot(A.shape[0],A.shape[0],i+1)
aa = Data_angle[i,0]
bb = Data_angle[i,1]
plt.imshow(A[int(aa),int(bb),omega,:,:])
labels = [item.get_text() for item in a1.get_xticklabels()]
empty_string_labels = ['']*len(labels)
a1.set_xticklabels(empty_string_labels)
labels = [item.get_text() for item in a1.get_yticklabels()]
empty_string_labels = ['']*len(labels)
a1.set_yticklabels(empty_string_labels)
a1.set(xticks=[], yticks=[])
fig.text(0.5, 0.04, 'Gamma', ha='center')
fig.text(0.04, 0.5, 'Mu', va='center', rotation='vertical')
plt.show()