Ejemplo n.º 1
0
 def plotMatrix(self,
                img,
                matrix,
                vminData,
                vmaxData,
                cmap='jet',
                xticksLablesMajor=None,
                yticksLablesMajor=None,
                rotationX=90.,
                rotationY=0.,
                **kwargs):
     interpolation = kwargs.get('interpolation', "none")
     plot = img.imshow(matrix,
                       interpolation=interpolation,
                       cmap=cmap,
                       vmin=vminData,
                       vmax=vmaxData)
     if (xticksLablesMajor is not None):
         plt.xticks(range(len(xticksLablesMajor)),
                    xticksLablesMajor[:len(xticksLablesMajor)],
                    rotation=rotationX)
     if (yticksLablesMajor is not None):
         plt.yticks(range(len(yticksLablesMajor)),
                    yticksLablesMajor[:len(yticksLablesMajor)],
                    rotation=rotationY)
     return plot
Ejemplo n.º 2
0
 def plotMatrix(self,
                _matrix,
                cmap='Greens',
                xticksLablesMajor=None,
                yticksLablesMajor=None,
                rotationX=90.,
                rotationY=0.):
     im = plt.imshow(_matrix, interpolation="none", cmap=cmap)
     if (xticksLablesMajor is not None):
         plt.xticks(range(len(xticksLablesMajor)),
                    xticksLablesMajor[:len(xticksLablesMajor)],
                    rotation=rotationX)
     if (yticksLablesMajor is not None):
         plt.yticks(range(len(yticksLablesMajor)),
                    yticksLablesMajor[:len(yticksLablesMajor)],
                    rotation=rotationY)
     cax = plt.colorbar(im)