📄 pi_global.m
字号:
function PI_Global(hObject, eventdata, handles)
global SCALE_OPT NUMBER_OF_COLORS GRAY_PCT CLIP COLOR_MAP NOBRIGHTEN PICKS PICKCOLOR XAXISTOP CLOSEREQUEST IMCONTROLS
q1='Type of Color Map';
a1='seisclrs|autumn|bone|colorcube|cool|copper|flag|gray|hot|hsv|jet|lines|pink|prism|spring|summer|white|winter';
q2='Brighten';
a2='Auto Brighten|Clipped Linear';
q3='Number of Colors (if seisclrs)';
a3='64';
q4='Grey Percentage (if seisclrs)';
a4='50';
q5='Picks Color';
a5='Red|Green|Blue';
q6='X-Axis Location';
a6='Bottom|Top';
q7='Type of Close';
a7='Check with User|Quick Close';
q8='Controls at start:';
a8='On|Off';
qs={q1 q2 q3 q4 q5 q6 q7 q8};
as={a1 a2 a3 a4 a5 a6 a7 a8};
flgs=[1 1 1 1 1 1 1 1];
a=askthingsle(gcf,qs,as,flgs,'Plot Image Properties');
if(isempty(a))
return
end
COLOR_MAP=deblank(a{1});
nobrighten=deblank(a{2});
switch nobrighten
case 'Auto Brighten'
NOBRIGHTEN=0;
case 'Clipped Linear'
NOBRIGHTEN=1;
end
number_of_colors=sort([4 round(deblank(a{3})) 150]);
NUMBER_OF_COLORS=number_of_colors(2);
gray_pct=sort([10 round(deblank(a{4})) 100]);
GRAY_PCT=gray_pct(2);
allpifig=findobj(0,'type','figure','tag','PLOTIMAGEFIGURE');
allaxis=get(allpifig,'currentaxes');
pickcolor=strunpad(a{5});
PICKCOLOR=lower(pickcolor(1,:));
if(strcmp(COLOR_MAP,'seisclrs'))
clrmap=seisclrs(NUMBER_OF_COLORS,GRAY_PCT);
set(allpifig,'colormap',clrmap);
else
hgcf=gcf;
for ii=1:length(allpifig)
set(0,'currentfigure',allpifig(ii));
% seisclrs|autumn|bone|colorcube|cool
% copper|flag|gray|hot|hsv|jet|lines
% pink|prism|spring|summer|white|winter
%#function autumn
%#function bone
%#function colorcube
%#function cool
%#function copper
%#function flag
%#function gray
%#function hot
%#function hsv
%#function jet
%#function lines
%#function pink
%#function prism
%#function spring
%#function summer
%#function white
%#function winter
colormap(COLOR_MAP);
set(findobj(gcf,'type','line','tag','PICKS'),'color',PICKCOLOR);
end
set(0,'currentfigure',hgcf);
end
set(findobj(gcf,'type','line','tag','PICKS'),'color',PICKCOLOR);
xaxistop=lower(strunpad(a{6}));
switch xaxistop
case 'top'
XAXISTOP=1;
case 'bottom'
XAXISTOP=0;
end
checkclose=a{7};
switch checkclose
case 'Check with User'
CLOSEREQUEST='Slow Close';
case 'Quick Close'
CLOSEREQUEST='Fast Close';
end
IMCONTROLS=a{8}; % should be simply "On" or "Off"
hgcf=gcf;
for ii=1:length(allpifig)
set(0,'currentfigure',allpifig(ii));
set(gca,'xaxislocation',xaxistop);
end
set(0,'currentfigure',hgcf);
h=get(gcf,'userdata');
hscale=h(6);
SCALE_OPT=get(hscale,'value');
hclip=h(7);
hslider=h(12);
val=get(hclip,'value');
dat=get(hclip,'userdata');
clips=[30 25 20 15 10 9 8 7 6 5 4 3 2 1 .5 .25 .1 .05 .01 .005 .001];
CLIP=clips(val);
save('plotimageproperties.mat','XAXISTOP','PICKCOLOR','NOBRIGHTEN','COLOR_MAP',...
'GRAY_PCT','NUMBER_OF_COLORS','SCALE_OPT','CLOSEREQUEST','IMCONTROLS');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -