Revision 495
(checked in by cbc, 11 years ago)
|
Initial import of Stark code.
|
Line | |
---|
1 |
function [cval,nband,cmap]=jetmap_band(smin,smax,ibw,cbflag) |
---|
2 |
cval=smin:ibw:smax; |
---|
3 |
ncolors=(smax-smin)/ibw; |
---|
4 |
nband=ncolors+2; |
---|
5 |
colormap(zeros(ncolors,3));jetmap=jet; |
---|
6 |
cmap(1,:)=[0 0 0]; |
---|
7 |
for i=1:ncolors |
---|
8 |
cmap(i+1,:)=jetmap(i,:); |
---|
9 |
end |
---|
10 |
cmap(nband,:)=[1 1 1]; |
---|
11 |
colormap(cmap);caxis([smin-ibw smax+ibw]); |
---|
12 |
cmap |
---|
13 |
if cbflag == 1 |
---|
14 |
in=[1 2 3 3];x=[0;1;1];y=[0;0;1];z=[0;0;0]; |
---|
15 |
hc=colormeshm(in,x,y,z); |
---|
16 |
hb=colorbar; |
---|
17 |
set(hb,'ytick',cval); |
---|
18 |
set(hb,'YAxisLocation','right'); |
---|
19 |
set(hb,'ticklength',[0.05 0.025]); |
---|
20 |
set(hb,'FontSize',1.0); |
---|
21 |
colormap(cmap);caxis([smin-ibw smax+ibw]); |
---|
22 |
delete(hc) |
---|
23 |
set(gca,'Visible','off'); |
---|
24 |
drawnow; |
---|
25 |
end |
---|