それは古い質問ですが、私は最近、同じ図に2つのヒートマップをプロットすることに関連することをしました。四角形を散布図に変換し、四角形を 2 つの三角形に変換しました。
カスタム マーカーを使用して 2 つの三角形を作成しました。
 import matplotlib
 import matplotlib.pyplot as plt
 import numpy as np
 def getCustomSymbol1(path_index=1):
  if path_index==1:  #upper triangle
      verts = [
      (0.0,0.0),
      (1.0,0.0),
      (1.0,1.0),
      (0.0,0.0),]
  else:              #lower triangle
      verts = [
      (0.0,0.0),
      (0.0,1.0),
      (1.0,1.0),
      (0.0,0.0),]
  codes = [matplotlib.path.Path.MOVETO,
           matplotlib.path.Path.LINETO,
           matplotlib.path.Path.LINETO,
           matplotlib.path.Path.CLOSEPOLY,
           ] 
  pathCS1 = matplotlib.path.Path(verts, codes)
  return pathCS1, verts
 def plot_mat(matrix=np.random.rand(20,20), path_index=1, alpha=1.0, vmin=0., vmax=1.):
    nx,ny = matrix.shape
    X,Y,values = zip(*[ (i,j,matrix[i,j]) for i in range(nx) for j in range(ny) ] )
    marker,verts = getCustomSymbol1(path_index=path_index)
    ax.scatter(X,Y,s=4000, 
               marker=marker, 
               c=values, 
               cmap='viridis', 
               alpha=alpha, 
               vmin=vmin, vmax=vmax )
    return
 fig = plt.figure()
 ax = fig.add_subplot(111)
 A  = np.random.uniform(20,50,30).reshape([6,5])
 B  = np.random.uniform(40,70,30).reshape([6,5])
 vmin = np.min([A,B])
 vmax = np.max([A,B])
 plot_mat(path_index=1,vmin=vmin,vmax=vmax,matrix=A)
 plot_mat(path_index=2,vmin=vmin,vmax=vmax,matrix=B)
 plt.xlim([0,6])
 plt.ylim([0,5])
 # for the colorbar i did the trick to make first a fake mappable:
 sm = plt.cm.ScalarMappable(cmap='viridis', norm=plt.Normalize(vmin=vmin, vmax=vmax ) )
 sm._A=[]
 plt.colorbar(sm)
 plt.show()
一緒にすると、次のようなものが得られます。
