Revision 495
(checked in by cbc, 12 years ago)
|
Initial import of Stark code.
|
Line | |
---|
1 |
|
---|
2 |
function clim= newclim(begslot,endslot,oldclim,cmlength); |
---|
3 |
|
---|
4 |
% NEWCLIM.M -- A routine which resets clims when plotting multiple |
---|
5 |
% subplots on one figure which require multiple colormaps. |
---|
6 |
% Effectively, NEWCLIM tricks matlab into letting us use |
---|
7 |
% part of the colormap (global to the figure, not the axes). |
---|
8 |
% |
---|
9 |
% You must concatenate the multiple colormaps and note their |
---|
10 |
% respective places within the extended colormap. |
---|
11 |
% |
---|
12 |
% NEWCLIM requires the following arguments: |
---|
13 |
% begslot/endslot - the first and last indices into the concatenated |
---|
14 |
% colormap |
---|
15 |
% oldclim - the original clims when plotted with the concatenated |
---|
16 |
% colormap |
---|
17 |
% cmlength - the length of the concatenated colormap |
---|
18 |
% |
---|
19 |
% output vars: |
---|
20 |
% clim - the new clims, to be reset through set(gca,....) |
---|
21 |
% |
---|
22 |
% See also PCBAR, a function which allows the desired subcolormap to be |
---|
23 |
% placed alongside the new colormesh. |
---|
24 |
% |
---|
25 |
% Calls: none |
---|
26 |
% |
---|
27 |
% Last modified: 7 Oct 1999 |
---|
28 |
% Catherine R. Edwards |
---|
29 |
% |
---|
30 |
|
---|
31 |
|
---|
32 |
Bslot=(begslot-1)/(cmlength-1); |
---|
33 |
Eslot=(endslot-1)/(cmlength-1); |
---|
34 |
cmrange=Eslot-Bslot; |
---|
35 |
drange=oldclim(2)-oldclim(1); |
---|
36 |
clrange=drange/cmrange; |
---|
37 |
clim(1)=oldclim(1)-(Bslot*clrange); |
---|
38 |
clim(2)=oldclim(2)+(1-Eslot)*clrange; |
---|
39 |
|
---|
40 |
return; |
---|