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

📄 label_and_time_stamp.m

📁 Matlab显式三维地震数据的源代码
💻 M
字号:
function label_and_time_stamp(time,label,axis_handle)
% Function creates time stamp and possibly a label on a plot
%
% Written by: E. Rietsch: October 21, 2006
% Last updated:
%
%         label_and_time_stamp(time,label)
% INPUT
% time    string with date and time (e.g. output of "datestr(now)")
% label   optional string for the left-hand corner of the plot
%
% EXAMPLE
%    figure; plot(1:11)
%    label_and_time_stamp(datestr(now),'This is a test')

drawnow		% Force any graphic object in the queue to be plotted

if nargin < 3 
   axis_handle=gca;	% Save handle to current axes
end

h=axes('Position',[0 0 1 1],'Visible','off');
yt=0.02;
text(0.8,yt,time,'FontSize',7); 

if nargin > 1  && ~isempty(label)
   text(0.1,yt,label,'FontSize',7);
end

set(h,'HandleVisibility','off');

axes(axis_handle)	% Make original axes the current axes

⌨️ 快捷键说明

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