Parent Directory
|
Revision Log
|
Revision Graph
Checking in work done with Dimitri on high-resolution cube gridding and parallel communications. o code is in a contrib experiment for now so we can continue collaborating on it. However most code is general and will be moved into main branch once it is fully hardened. o There are README files in the contrib root and in the subdirectories that explain the contents
1 | cnh | 1.1 | % key.m |
2 | % | ||
3 | % key(linestyle1,label1, [linestyle2,label2,] ...) | ||
4 | % | ||
5 | function [] = key(varargin) | ||
6 | nargs=nargin; | ||
7 | if mod(nargs,2) ~= 0 | ||
8 | sprintf('Error: needs even number of arguments') | ||
9 | return | ||
10 | end | ||
11 | |||
12 | ax=axis; | ||
13 | dx=1/15*(ax(2)-ax(1)); | ||
14 | rm=ax(2)-dx/2; | ||
15 | lm=rm-4*dx; | ||
16 | dy=1/15*(ax(4)-ax(3)); | ||
17 | bm=ax(3)+dy/2; | ||
18 | tm=bm+nargs/2*dy; | ||
19 | |||
20 | hold on | ||
21 | patch([lm-1.1*dx rm rm lm-1.1*dx],[tm+dy/2 tm+dy/2 tm-nargs/2*dy tm-nargs/2*dy],'w') | ||
22 | hold off | ||
23 | |||
24 | hold on | ||
25 | for j=1:2:nargs-1; | ||
26 | y=tm-(j-0.5)*dy/2; | ||
27 | plot([lm-dx lm-0.1*dx],y*[1 1],varargin{j}) | ||
28 | text(lm,y,varargin{j+1}) | ||
29 | end | ||
30 | hold off |
ViewVC Help | |
Powered by ViewVC 1.1.22 |