myImagesc

PURPOSE ^

MYIMAGESC plot imagesc() with compact layout

SYNOPSIS ^

function [ hImage ] = myImagesc( matrix, plotOpt )

DESCRIPTION ^

 MYIMAGESC plot imagesc() with compact layout

   [ hImage ] = myImagesc( matrix, plotOpt )
   myImagesc() plot imagesc() with compact layout.

   Input:
       matrix: matrix to plot
       plotOpt: plot option
           plotOpt.showXTick == false, no tick label on x-axis
           plotOpt.showYTick == false, no tick label on y-axis

   Output:
       hImage: handle of plot

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [ hImage ] = myImagesc( matrix, plotOpt )
0002 % MYIMAGESC plot imagesc() with compact layout
0003 %
0004 %   [ hImage ] = myImagesc( matrix, plotOpt )
0005 %   myImagesc() plot imagesc() with compact layout.
0006 %
0007 %   Input:
0008 %       matrix: matrix to plot
0009 %       plotOpt: plot option
0010 %           plotOpt.showXTick == false, no tick label on x-axis
0011 %           plotOpt.showYTick == false, no tick label on y-axis
0012 %
0013 %   Output:
0014 %       hImage: handle of plot
0015 
0016 %    ---------
0017 %    Yen-Nan Lin, NTHU, 2010-2014, Matlab 2012a
0018 
0019 [nRow, nCol] = size(matrix);
0020 hImage = imagesc(matrix);
0021 colorbar;
0022 axis equal;
0023 xlim([0.5, nCol + 0.5]);
0024 ylim([0.5, nRow + 0.5]);
0025 if plotOpt.showXTick == false
0026     set(gca, 'xTick', []);
0027 end
0028 if plotOpt.showYTick == false
0029     set(gca, 'yTick', []);
0030 end
0031 set(gca, 'fontName', 'Arial');
0032 end

Generated on Thu 30-Jan-2014 00:00:07 by m2html © 2005