이 플롯을 어떻게 수정할 수 있습니까?gridspec으로 열 너비를 조정하는 방법은 무엇입니까?
내가 원하는 :
- 컬러 바 모두 중복되지.
- 높이를 플롯과 동일하게 만듭니다.
combined = (...) # some irrelevant to question data praparation - this variable contain square matrix with RGBA chanels plt.figure(dpi=300, figsize=(2.1,1.9)) gs = gridspec.GridSpec(1, 3, width_ratios=[20,1,1]) ax1 = plt.subplot(gs[0]) ax2 = plt.subplot(gs[1]) ax3 = plt.subplot(gs[2]) cax = ax1.imshow(combined, interpolation="None") mpl.colorbar.ColorbarBase(ax2, cmap=cmap_top, norm=norm_top) mpl.colorbar.ColorbarBase(ax3, cmap=cmap_top, norm=norm_top)
내가 파이썬 3.6를 사용하고 2.0을하기 matplotlib 해요 :
여기 내 코드입니다.