📄 printgui.m
字号:
function printgui(figname)
% PRINTGUI Screen Capture Print utility for ADSP TOOLBOX GUIS.
% PRINTGUI (with no arguments) prints to a printer.
% PRINTGUI(fileame) Prints to an eps file called filename.eps.
% NOTE: Filename must be a string (in quotes) [e.g. 'testfile']
%
% FOR USE PRIMARILY WITH MATLAB v4.x
% (For MATLAB v5.x, the MATLAB print option works just as well.)
% ADSP Toolbox: Version 2.0
% For use with "Analog and Digital Signal Processing", 2nd Ed.
% Published by PWS Publishing Co.
%
% Ashok Ambardar, EE Dept. MTU, Houghton, MI 49931, USA
% http://www.ee.mtu/faculty/akambard.html
% e-mail: akambard@mtu.edu
% Copyright (c) 1998
cur_fig=gcf; % handle of current figure
[X,map]=capture; % capture bit map image
new_fig = figure; % create new figure window
image(X); % plot image in new figure window
axis off; % Remove all labeling
%Convert colors that dont show up well to white (if needed)
s=sum(map.');
i=find(map(:,1)==0);
for k=1:length(i)
if s(i(k))>0 % cyan or green or blue
map(i(k),:)=[1 1 1]; % white
end
end
%set(gca,'position',[0 0 1 1]); %Fill entire figure. No need
colormap(1-map); % use inverted colormap (to waste less ink!!)
%colormap(map); % use original colormap
if nargin==0
print % send figure to printer
else
print('-deps', '-epsi',figname) % print as .eps file to figname.eps
end
delete(new_fig); %Delete newly created figure
figure(cur_fig); %Back to the tagged figure
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -