⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 colorplot.m

📁 实现地震勘探中
💻 M
字号:
function handle=colorplot(matrix,x,y,xinfo,yinfo,zinfo,param)% Plot entries of a matrix as in a color scale%% Written by: E. R.: September 1, 2003% Last updated: February 17, 2004: Better default values%%           colorplot(matrix,x,y,xinfo,yinfo,zinfo,param)% INPUT% matrix    matrix to plot% x         horizontal axis --- x(1) is left% y         vertical axis   --- y(1) is top% xinfo     three-element cell array; all elements are strings; first is a %           mnemonic (for cursor tracking), second units of measurement, %           the third string is the x-axis label% yinfo     three-element cell array; all elements are strings; first is a %           mnemonic (for cursor tracking), second units of measurement, %           the third string is the y-axis label% zinfo     three-element cell array; all elements are strings; first is a %           mnemonic (for cursor tracking), second units of measurement, %           the third string is the z-axis label (not used)% EXAMPLE%           figure%           colorplot(rand(10,20))[n,m]=size(matrix);if nargin < 7   param.colormap=colormap('jet');   param.edgecolor='k';   param.gaps=[0,0];   param.limits=[];endif nargin < 6   zinfo={'z','n/a','Z'};endif nargin < 5   xinfo={'x','n/a','X'};   yinfo={'y','n/a','Y'};endif nargin < 3   x=1:m;   y=(1:n)';end%     Check compatibilityif length(x) ~= m || length(y) ~= n   warning(' Incompatible dimensions in "colorplot".')  %#ok   keyboardenduserdata=get(gca,'UserData');if isempty(param.limits)   handle=imagesc(x,y,matrix);else   handle=imagesc(x,y,matrix,param.limits);endgrid onxlabel(info2label(xinfo));ylabel(info2label(yinfo));	% Implement cursor trackingbool=true;try   bool=~strcmp(userdata.tag,'display_cursor_location_3d');catch   % Do nothingendinitiate_3d_tracking(matrix,x,y,xinfo,yinfo,zinfo,bool)if nargout == 0   clear handleend

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -